Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

              
                <header class="header" id="header">
    <div class="container container-mob" id="container">
      <div class="header__top" id="headerTop">
        <button class="burger" id="burgerBtn">
          <span class="burger__menu" id="activeBtn">Menu</span>
        </button>
        <a href="" class="header__about"> О Сахафильме </a>
        <a href="" class="logo__mob"><img src="images/logoMob.png" alt="Sakhafilm_logo" /></a>
        <a href="" class="logo__desk"><img src="images/logo.png" alt="Sakhafilm_logo" /></a>
        <div class="header__tools">
          <button class="header__btn">Войти</button>
          <a href="" class="header__search">
            <span>
              <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                <circle cx="11" cy="11" r="7" stroke="#333333" stroke-width="2" />
                <path d="M20 20L17 17" stroke="#333333" stroke-width="2" stroke-linecap="round" />
              </svg>
            </span>
          </a>

        </div>
      </div>
      <div class="header__menu" id="MenuNav">
        <nav>
          <ul>
            <li class="header__menu_link"><a href="">Новости</a></li>
            <li class="header__menu_link"><a href="">Кинозал</a></li>
            <li class="header__menu_link"><a href="">Фильмы онлайн</a></li>
            <li class="header__menu_link"><a href="">Любителям кино</a></li>
            <li class="header__menu_link"><a href="">Контакты</a></li>
            <li class="header__menu_link"><a href="">Фестиваль</a></li>
          </ul>
        </nav>

      </div>

    </div>
  </header>
              
            
!

CSS

              
                .header {
    padding: 40px 0px 20px 0px;
}

.container {
    max-width: 1540px;
    margin: 0 auto;
    padding: 0px 20px;
}

.header__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__about {
    text-decoration: none;
    font-size: 14px;
    color: #333333;

    transition: opacity .4s;
}

.header__about:hover {
    opacity: .7;
}

.header__tools {
    display: flex;
    align-items: center;
}

.header__btn {
    border: 1px solid #333333;
    border-radius: 4px;
    font-size: 14px;
    background-color: transparent;
    color: #333333;

    padding: 10px 22px;
    cursor: pointer;

    transition: all .4s;
}

.header__btn:hover {
    color: red;
    border: 1px solid red;
}

.header__search {
    margin: 0px 0px 0px 32px;

    transition: all .4s;
}

.header__menu {
    margin: 40px 0px 0px 0px;
}

.header__menu nav ul {
    display: flex;
    justify-content: space-between;

}

.header__menu_link {
    list-style-type: none;
}

.header__menu_link a {
    font-size: 20px;
    text-decoration: none;
    color: #333333;

    transition: all .4s;
}

.header__menu_link a:hover {
    color: red;
}

.logo__mob {
    display: none;
} 
















@media only screen and (max-width: 1900px) {

.header {
        padding: 0;
        position: fixed;
        top: 0;
        z-index: 11;
        width: 100%;
        background: #fff;
    }

    .active__menu {
        height: 100vh;
        overflow: hidden;
        transition: all .5s ease-out;
    }

    .header__btn {
        display: none;
    }

    .header__top {
        padding: 15px;
    }

    .headerColor {
        background-color: #597fbf;
        transition: all .4s;
    }

    .header__menu {
        width: 100%;
        margin: 0;
        display: none;
        transform: translateY(-100%);
        transition: all 0.4s ease-in-out;
    }

    .header__menu.header__active {
        background-color: #597fbf;
        display: block;
        padding: 20px 0px 0px 0px;
        height: 100vh;
        position: absolute;
        z-index: -1;

        transform: translateY(0%);


    }

    .header__menu nav {
        transform: translateX(-125%);
        transition: all 0.4s ease-in-out;
        padding: 0px 40px;
    }

    .header__active nav {
        transform: translateY(0%);

    }

    .header__menu nav ul {
        /* display: none; */
        flex-direction: column;

        width: 100%;
    }

    .header__menu nav ul li {
        padding: 15px 0px;

        border-bottom: 1px solid #668ccc;

    }

    .header__menu_link a {
        color: #fff;
    }

    .header__menu nav ul li a:hover {
        color: #fff;
        opacity: .8;
    }

    .header__about {
        display: none;
    }

    .header__search {
        margin: 0;
    }
   .logo__mob {
        display: block;
    }

    .logo__desk {
        display: none;
    }

    .burger {
        display: block;
    }
  
}
              
            
!

JS

              
                const headerMenu = document.querySelector("#header");
const menuNav = document.querySelector("#MenuNav");
const activeBtn = document.querySelector("#activeBtn");
const burgerBtn = document.querySelector("#burgerBtn");
const headerTop = document.querySelector("#headerTop");


burgerBtn.addEventListener("click", NavToggle);

function NavToggle (){
  headerMenu.classList.toggle("active__menu");
  menuNav.classList.toggle("header__active");
  activeBtn.classList.toggle("active");
  document.body.classList.toggle("menu__opened");
  headerTop.classList.toggle("headerColor");
}
              
            
!
999px

Console