Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  
<ul class="js-css-menu shadow responsive">  
<li><a href="#">Link</a></li>
<li class="current"><a href="#">Current</a></li>
<li><a href="#">Link with Menu</a> 
<div>
<ul>
<li><b>Шаблоны</b></li>
<li><a href="#">Sublink 1</a></li>
<li><a href="#">Sublink 2</a></li>
<li><a href="#">Sublink 3</a></li>
</ul>
<ul>
<li><b>Скрипты</b></li>
<li><a href="#">Sublink 1</a></li>
<li><a href="#">Sublink 2</a></li>
<li><a href="#">Sublink 3</a></li>
</ul>
</div>  
<li><a href="#">Link with Menu</a>
 <li><a href="#">Link with Menu</a>
 <li><a href="#">Link with Menu</a>   
</li>
<li><a href="#">Link</a></li>
</ul>
  
  
</body>
</html>
              
            
!

CSS

              
                .js-css-menu {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 14px;
    border: 1px solid #ff8484;
    display: inline-block;
}

    .js-css-menu, .js-css-menu ul, .js-css-menu li {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .js-css-menu a {
        text-decoration: none;
        -moz-transition: all 0.15s ease-in-out;
        -webkit-transition: all 0.15s ease-in-out;
        -o-transition: all 0.15s ease-in-out;
        -ms-transition: all 0.15s ease-in-out;
        transition: all 0.15s ease-in-out;
    }
    .js-css-menu > li {
        display: inline-block;
        float: left;
    }


.js-css-menu > li > a {
    color: #fefefe;
    text-shadow: 0 -1px 0 #630404;
    background-color: #a50a0a;
    background-image: linear-gradient(top, #770707 20%, #770707);
    background-image: -moz-linear-gradient(top, #dd0000 20%, #aa0000);
    background-image: -webkit-linear-gradient(top, #dc1414 20%, #7b1b1b);
    background-image: -o-linear-gradient(top, #a71f1f 20%, #a71f1f);
    background-image: -ms-linear-gradient(top, #751c1c 20%, #751c1c);
    background-image: -webkit-gradient(linear, left top, left bottom, from(#dd0000) 20%, to(#aa0000));
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='$to', EndColorStr='$from');
    padding: 17px 23px;
    display: block;
}


.js-css-menu > li:hover > a {
    background-color: #d01b1b;
    background-image: linear-gradient(top, #fa0000 20%, #af0000);
    background-image: -moz-linear-gradient(top, #fa0000 20%, #af0000);
    background-image: -webkit-linear-gradient(top, #750909 20%, #f12626);
    background-image: -o-linear-gradient(top, #f12626 20%, #f12626);
    background-image: -ms-linear-gradient(top, #fe21616 20%, #e21616);
    background-image: -webkit-gradient(linear, left top, left bottom, from(#fa0000) 20%, to(#af0000));
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='$to', EndColorStr='$from');
}



    .js-css-menu > li > a:active {
        background-color: #940707;
        background-image: linear-gradient(top, #b11212 20%, #c71f1f);
        background-image: -moz-linear-gradient(top, #b11212 20%, #c71f1f);
        background-image: -webkit-linear-gradient(top, #b11212 20%, #c71f1f);
        background-image: -o-linear-gradient(top, #aa0000 20%, #c71f1f);
        background-image: -ms-linear-gradient(top, #b11212 20%, #c71f1f);
        background-image: -webkit-gradient(linear, left top, left bottom, from(#b11212) 20%, to(#c71f1f));
box-shadow: inset 0 1px 7px rgba(19, 17, 17, 0.25);
        -moz-box-shadow: inset 0 1px 8px rgba(23, 23, 23, 0.25);
        -webkit-box-shadow: inset 0 1px 8px rgba(23, 23, 23, 0.25);
    }


.js-css-menu > li.current > a {
    background-color: #9c0808;
    background-image: linear-gradient(top, #880000 20%, #aa0000);
    background-image: -moz-linear-gradient(top, #880000 20%, #aa0000);
    background-image: -webkit-linear-gradient(top, #860c0c 20%, #f12c2c);
    background-image: -o-linear-gradient(top, #9a0a0a 20%, #9a0a0a);
    background-image: -ms-linear-gradient(top, #8a0505 20%, #8a0505);
    background-image: -webkit-gradient(linear, left top, left bottom, from(#b70a0a) 20%, to(#b70a0a));

box-shadow: inset 0 1px 7px rgba(21, 20, 20, 0.28);
    -moz-box-shadow: inset 0 1px 7px rgba(0, 0, 0, 0.25);
    -webkit-box-shadow: inset 0 1px 7px rgba(19, 18, 18, 0.28);
}

    /* SUBMENU */
    .js-css-menu > li div {
        border-top: 1px solid #900000;
        display: block;
        position: absolute;
        visibility: hidden;
        opacity: 0;
        -moz-transition: all 0.17s ease-in-out;
        -webkit-transition: all 0.17s ease-in-out;
        -o-transition: all 0.17s ease-in-out;
        -ms-transition: all 0.17s ease-in-out;
        transition: all 0.17s ease-in-out;
    }
.js-css-menu > li div a {
    color: #f7f1f1;
    margin: 0px 18px 0px 0px;
}
    .js-css-menu > li div a:hover, .js-css-menu > li div a:focus {
        color: #fefefe;
    }
    .js-css-menu > li div ul {
        float: left;
    }

.js-css-menu > li div ul li {
    line-height: 2em;
    padding: 3px;
    margin: 1px;
}


    .js-css-menu > li div ul:not(:first-child) {
        margin-left: 18px;
    }


.js-css-menu > li:hover div, .js-css-menu > li:focus div {
    color: #f5f0f0;
    background: #b00000;
    padding: 18px 37px;
    visibility: visible;
    opacity: 1;
}


    .js-css-menu.vertical {
        width: 100px; 
    }
    .js-css-menu.vertical > li {
        display: block;
        float: none;
        position: relative;
    }
    .js-css-menu.vertical > li div {
        width: 150px;
        left: 101px; 
        top: 0;
    }

    .js-css-menu.rounded {
        border-radius: 3px;
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
    }
    .js-css-menu.rounded > li:first-child > a {
        border-top-left-radius: 2px;
        -moz-border-radius-topleft: 2px;
        -webkit-border-top-left-radius: 2px;
        border-bottom-left-radius: 2px;
        -moz-border-radius-bottomleft: 2px;
        -webkit-border-bottom-left-radius: 2px;
    }
    .js-css-menu.rounded > li:last-child > a {
        border-top-right-radius: 2px;
        -moz-border-radius-topright: 2px;
        -webkit-border-top-right-radius: 2px;
        border-bottom-right-radius: 2px;
        -moz-border-radius-bottomright: 2px;
        -webkit-border-bottom-right-radius: 2px;
    }
    .js-css-menu.rounded > li div {
        border-radius: 3px;
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
        border-top-left-radius: 0;
        -moz-border-radius-topleft: 0;
        -webkit-border-top-left-radius: 0;
    }
    .js-css-menu.rounded.vertical > li:first-child > a {
        border-bottom-left-radius: 0;
        -moz-border-radius-bottomleft: 0;
        -webkit-border-bottom-left-radius: 0;
        border-top-right-radius: 3px;
        -moz-border-radius-topright: 3px;
        -webkit-border-top-right-radius: 3px;
    }
    .js-css-menu.rounded.vertical > li:last-child > a {
        border-top-right-radius: 0;
        -moz-border-radius-topright: 0;
        -webkit-border-top-right-radius: 0;
        border-bottom-left-radius: 3px;
        -moz-border-radius-bottomleft: 3px;
        -webkit-border-bottom-left-radius: 3px;
    }

    /* SHADOW style */
    .js-css-menu.shadow, .js-css-menu.shadow div {
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    @media (max-width: 480px) {
        .js-css-menu.responsive, .js-css-menu.responsive > li {
            width: auto!important;
            display: block;
            float: none;
        }
        .js-css-menu.responsive > li:first-child > a {
            border-bottom-left-radius: 0 !important;
            -moz-border-radius-bottomleft: 0 !important;
            -webkit-border-bottom-left-radius: 0 !important;
            border-bottom-right-radius: 0 !important;
            -moz-border-radius-bottomright: 0 !important;
            -webkit-border-bottom-right-radius: 0 !important;
        }
        .js-css-menu.responsive > li:last-child > a {
            border-top-left-radius: 0 !important;
            -moz-border-radius-topleft: 0 !important;
            -webkit-border-top-left-radius: 0 !important;
            border-top-right-radius: 0 !important;
            -moz-border-radius-topright: 0 !important;
            -webkit-border-top-right-radius: 0 !important;
        }
        .js-css-menu.responsive > li div {
            display: none!important;
        }
    }
              
            
!

JS

              
                
              
            
!
999px

Console