Pen Settings



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


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


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.


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.


                <script src=""></script>
<nav id="main-menu">
        <li id="menu-item-11482" class="current-menu-item"><a href="" aria-current="page">Главная</a></li>
        <li id="menu-item-140" class="menu-item-has-children"><a href="">Меню 2</a>
            <ul class="sub-menu">
                <li id="menu-item-11479"><a href="">Под-меню пункт 1</a></li>
                <li id="menu-item-11478"><a href="">Под-меню пункт 2</a></li>
                <li id="menu-item-11480"><a href="">Под-меню пункт 3</a></li>
                <li id="menu-item-11451" class="menu-item-has-children"><a href="">Под-меню пункт 4</a>
                    <ul class="sub-menu">
                        <li id="menu-item-11481"><a href="">Под-под меню</a></li>
                <li id="menu-item-11477"><a href="">Под-меню пункт 5</a></li>
        <li id="menu-item-5"><a href="">Меню 3</a></li>
        <li id="menu-item-113"><a href="">Меню 4</a></li>


                #main-menu {
    background-color: black;
    min-height: auto;
    border-bottom: 1px solid #302e2e;
    border-top: 1px solid #302e2e;    
    margin-bottom: 10px;
#main-menu a{text-decoration:none;}
#main-menu ul {
    flex-wrap: wrap;
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
#main-menu ul > li {font-size:12px;
    list-style: none;
    padding: 0;
    margin: 0;
    border-right: 1px solid #302e2e;
    transition: background 0.2s ease;
    position: relative;font-size:14px;

#main-menu ul > li li{
    border-right: none;

#main-menu ul > {
    padding-right: 10px;

#main-menu ul > > a {
    position: relative;
#main-menu ul > > a:after {
    position: absolute;
    top: 45%;
    right: -11px;
    content: "▼";
    color: #ffffff;
    transform: translateY(-45%);          
    padding:15px 18px 13px 8px;
    font-size: 1rem;

#main-menu ul.sub-menu > > a::after {
    content: "►";

#main-menu ul > li:hover,
#main-menu ul > li.current-menu-item,
#main-menu ul > li.current-menu-ancestor,
#main-menu ul > li.current-menu-parent {
    background-color: #547287;
    text-shadow: 0px 1px 1px #0c0d43;

#main-menu ul > li a {
    display: block;
    font-size: 14px;
    color: #fff;    
    text-transform: uppercase;
    padding: 1.5rem 2rem 1.1rem 2rem;

#main-menu ul > li {
    background-color: blue;

#main-menu ul.sub-menu,
#main-menu ul.children {
    background: #272727 none repeat scroll 0 0;
    position: absolute;
    min-width: 270px;
    left: 0;
    top: 120%;
    visibility: hidden;
    opacity: 0;
    z-index: 11111;
    transition: all 0.5s ease;

#main-menu ul.sub-menu li {
    border-bottom: 1px solid #302e2e;
    float: none;

#main-menu ul > li:hover > .sub-menu,
#main-menu ul > li:hover > .children {
    top: 100%;
    opacity: 1;
    visibility: visible;

#main-menu ul.sub-menu ul,
#main-menu ul.children ul {
    left: 110%;
    top: 0 !important;

#main-menu ul.children li,
#main-menu ul.sub-menu li {
    width: 100%;

#main-menu .sub-menu > li:hover > ul {
    left: 100%;


                jQuery(document).ready(function($) {
    jQuery('#main-menu').mouseleave(function() {
        jQuery('#main-menu ul li ul').css('pointer-events','none');
        jQuery('#main-menu ul li ul')
            .queue(function (next) { 
            jQuery('#main-menu ul li ul').css('pointer-events', 'auto');