0 Comments

Code can be found here: http://plnkr.co/edit/EgLVcgyPcbu7AngvnnOy?p=preview

image

 

<!DOCTYPE html>
<html>
<head>
    <title>Vanilla javascript spike page.</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <!-- App styles -->
    <style>
        html, body {
            height: 100%;
        }

        body, div, p, ul, li {
            border: 0;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            margin: 0;
            outline: 0;
            padding: 0;
        }

        body {
            padding: 20px;
            background-color:#393939;
        }
             
        .bordered {
            color: #F1F1F1;
            display: inline-block;
            width: 180px;
            height: 100px;
            border-right: 1px solid #F1F1F1;
            border-image: linear-gradient(to bottom, #393939 0%,#F1F1F1 25%,#F1F1F1 75%,#393939 100%) 1 stretch;
        }
    </style>

   </head>
<body>
    <div class="bordered">A linear gradient border:</div>
</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts