Code can be found here:



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

    <!-- App styles -->
        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;
        .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;

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

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.