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

              
                          <nav class="navigation">
              <div class="navigation__item has-submenu"><a class="navigation__link animate" href="#">Категории</a>
                  <div class="submenu">
                      <div class="hover">
                        <a class="submenu__item" href="#">Программирование</a>
                          <div class="subsubmenu">
                            <a class="subsubmenu__item" href="/programmirovanie/1c">1C</a>
                            <a class="subsubmenu__item" href="/programmirovanie/agile">Agile</a>
                            <a class="subsubmenu__item" href="/programmirovanie/android">Android</a>
                            <a class="subsubmenu__item" href="/programmirovanie/backend">Back-End</a>
                            <a class="subsubmenu__item" href="/programmirovanie/big_data">Big Data</a>
                            <a class="subsubmenu__item" href="/programmirovanie/data_analyst">Data Analyst</a>
                            <a class="subsubmenu__item" href="/programmirovanie/data_engineer">Data Engineer</a>
                            <a class="subsubmenu__item" href="/programmirovanie/data_science">Data Science</a>
                            <a class="subsubmenu__item" href="/programmirovanie/devops">DevOps</a>
                            <a class="subsubmenu__item" href="/programmirovanie/frontend">Front-End</a>
                            <a class="subsubmenu__item" href="/programmirovanie/git">Git</a>
                            <a class="subsubmenu__item" href="/programmirovanie/ios">iOS</a>
                            <a class="subsubmenu__item" href="/programmirovanie/java">Java</a>
                            <a class="subsubmenu__item" href="/programmirovanie/javascript">JavaScript</a>
                            <a class="subsubmenu__item" href="/programmirovanie/kotlin">Kotlin</a>
                            <a class="subsubmenu__item" href="/programmirovanie/linux">Linux</a>
                            <a class="subsubmenu__item" href="/programmirovanie/mobile_qa">Mobile QA</a>
                            <a class="subsubmenu__item" href="/programmirovanie/node.js">Node.js</a>
                            <a class="subsubmenu__item" href="/programmirovanie/pascal">Pascal</a>
                            <a class="subsubmenu__item" href="/programmirovanie/php">PHP</a>
                            <a class="subsubmenu__item" href="/programmirovanie/product_manager">Product Manager</a>
                            <a class="subsubmenu__item" href="/programmirovanie/project_manager">Project Manager</a>
                            <a class="subsubmenu__item" href="/programmirovanie/python">Python</a>
                            <a class="subsubmenu__item" href="/programmirovanie/qa-testirovanie">QA-тестирование</a>
                            <a class="subsubmenu__item" href="/programmirovanie/react.js">React.js</a>
                            <a class="subsubmenu__item" href="/programmirovanie/ruby">Ruby</a>
                            <a class="subsubmenu__item" href="/programmirovanie/scratch">Scratch</a>
                            <a class="subsubmenu__item" href="/programmirovanie/swift">Swift</a>
                            <a class="subsubmenu__item" href="/programmirovanie/team_lead">Team Lead</a>
                            <a class="subsubmenu__item" href="/programmirovanie/typescript">TypeScript</a>
                            <a class="subsubmenu__item" href="/programmirovanie/unity">Unity</a>
                            <a class="subsubmenu__item" href="/programmirovanie/unreal_engine">Unreal Engine</a>
                            <a class="subsubmenu__item" href="/programmirovanie/vr_ar">VR &amp; AR</a>
                            <a class="subsubmenu__item" href="/programmirovanie/web_design">Web-дизайн</a>
                            <a class="subsubmenu__item" href="/programmirovanie/web_developer">Веб-разработка</a>
                            <a class="subsubmenu__item" href="/programmirovanie/gamedesign">Гейм-дизайн</a>
                            <a class="subsubmenu__item" href="/programmirovanie/mobile_apps_design">Дизайн мобильных приложений</a>
                            <a class="subsubmenu__item" href="/programmirovanie/artificial_intelligence">Искусственный интеллект</a>
                            <a class="subsubmenu__item" href="/programmirovanie/cybersecurity">Кибербезопасность</a>
                            <a class="subsubmenu__item" href="/programmirovanie/sql">Курсы SQL</a>
                            <a class="subsubmenu__item" href="/programmirovanie/ui_ux">Курсы UI/UX</a>
                            <a class="subsubmenu__item" href="/programmirovanie/machine_learning">Машинное обучение</a>
                            <a class="subsubmenu__item" href="/programmirovanie/mobile_apps">Мобильные приложения</a>
                            <a class="subsubmenu__item" href="/programmirovanie/neural_networks">Нейронные сети</a>
                            <a class="subsubmenu__item" href="/programmirovanie/oblachnye_tehnologii">Облачные технологии</a>
                            <a class="subsubmenu__item" href="/programmirovanie/osnovy">Основы программирования</a>
                            <a class="subsubmenu__item" href="/programmirovanie/olimpiady">Подготовка к олимпиадам</a>
                            <a class="subsubmenu__item" href="/programmirovanie/dlya_detej">Программирование для детей</a>
                            <a class="subsubmenu__item" href="/programmirovanie/gamedev">Разработка игр</a>
                            <a class="subsubmenu__item" href="/programmirovanie/sysadmin">Системное администрирование</a>
                            <a class="subsubmenu__item" href="/programmirovanie/c">Язык C</a>
                            <a class="subsubmenu__item" href="/programmirovanie/csharp">Язык C#</a>
                            <a class="subsubmenu__item" href="/programmirovanie/go">Язык Go</a>
                            <a class="subsubmenu__item" href="/programmirovanie/r">Язык R</a>
                          </div>
                      </div>
                      <div class="hover">
                        <a class="submenu__item" href="#">Хобби</a>
                          <div class="subsubmenu">
                            <a class="subsubmenu__item" href="/krasota/apparatnaya_kosmetologiya">Аппаратная косметология</a>
                            <a class="subsubmenu__item" href="/krasota/apparatnyy_manikyur">Аппаратный маникюр</a>
                            <a class="subsubmenu__item" href="/krasota/barber">Барбер</a>
                            <a class="subsubmenu__item" href="/krasota/brovist">Бровист</a>
                            <a class="subsubmenu__item" href="/krasota/vecherniye_pricheski">Вечерние прически</a>
                            <a class="subsubmenu__item" href="/krasota/vizazhist">Визажист</a>
                            <a class="subsubmenu__item" href="/krasota/dizayn-nogtey">Дизайн ногтей</a>
                            <a class="subsubmenu__item" href="/krasota/zhenskie_strizhki">Женские стрижки</a>
                            <a class="subsubmenu__item" href="/krasota/inektsionnaya_kosmetologiya">Инъекционная косметология</a>
                            <a class="subsubmenu__item" href="/krasota/koloristika_volos">Колористика волос</a>
                            <a class="subsubmenu__item" href="/krasota/konturnaya_plastika">Контурная пластика</a>
                            <a class="subsubmenu__item" href="/krasota/kosmetolog-bez-medobrazovaniya">Косметолог без медобразования</a>
                            <a class="subsubmenu__item" href="/krasota/kosmetolog-s-medobrazovaniem">Косметолог с медобразованием</a>
                            <a class="subsubmenu__item" href="/krasota/kosmetolog_estetist">Косметолог-эстетист</a>
                            <a class="subsubmenu__item" href="/krasota/laminirovanie_resnits">Ламинирование ресниц</a>
                            <a class="subsubmenu__item" href="/krasota/makiyazh">Макияж</a>
                            <a class="subsubmenu__item" href="/krasota/manikyur">Маникюр</a>
                            <a class="subsubmenu__item" href="/krasota/medsestra_v_kosmetologii">Медсестра в косметологии</a>
                            <a class="subsubmenu__item" href="/krasota/mezoterapiya">Мезотерапия</a>
                            <a class="subsubmenu__item" href="/krasota/muzhskie_strizhki">Мужские стрижки</a>
                            <a class="subsubmenu__item" href="/krasota/narashchivanie_volos">Наращивание волос</a>
                            <a class="subsubmenu__item" href="/krasota/naraschivanie_nogtej">Наращивание ногтей</a>
                            <a class="subsubmenu__item" href="/krasota/narashchivanie-resnits">Наращивание ресниц</a>
                            <a class="subsubmenu__item" href="/krasota/parikmaher">Парикмахер</a>
                            <a class="subsubmenu__item" href="/krasota/pedikyur">Педикюр</a>
                            <a class="subsubmenu__item" href="/krasota/piling">Пилинг</a>
                            <a class="subsubmenu__item" href="/krasota/pletenie_kos">Плетение кос</a>
                            <a class="subsubmenu__item" href="/krasota/shugaring">Шугаринг</a>
                            <a class="subsubmenu__item" href="/krasota/epilyatsiya">Эпиляция</a>
                          </div>
                      </div>
                      <a class="submenu__item" href="#">Психология</a>
                  </div>
              </div>
          </nav>
              
            
!

CSS

              
                .submenu {
  position: absolute;
  top: 7rem;
  padding-top: 2.7rem;
  padding-bottom: 2.1rem;
  box-sizing: border-box;
  display: none;
}

.submenu__item {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 2.4rem;
  margin-bottom: 1.6rem;
  color: #000000;
  display: block;
  padding-right: 4.3rem;
}

.submenu__item:hover {
  color: #259EAE;
}

.has-submenu .hover .submenu__item {
  background: url("./../icon/arrow-grey-light.svg") no-repeat 100% center;
}

.subsubmenu {
  position: absolute;
  left: 100%;
  top: -100%;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  padding-top: 3.1rem;
  padding-left: 3.4rem;
  box-sizing: border-box;
  opacity: 0;
}

.subsubmenu__item {
  margin-bottom: 2.4rem;
  margin-right: 2.4rem;
  width: 70%;
}

.subsubmenu__item:hover {
  transition: 0.5s linear;
  color: #259EAE;
}

.hover:hover .subsubmenu {
  top: 0;
  opacity: 1;
  transition: top 0.3s linear;
}

.menu-background {
  width: 100vw;
  position: absolute;
  background: #fff;
  display: none;
}
              
            
!

JS

              
                let current = $('.has-submenu');
    current.hover(function () {
        $(this).find('.submenu').stop().slideDown(500);
        $(this).find('.subsubmenu').stop().slideDown(500);

        let h_submenu = $(this).find('.submenu').outerHeight();
        let h_subsubmenu = $(this).find('.subsubmenu').outerHeight();

        if (h_submenu < h_subsubmenu) {
            $('.menu-background').css({height: h_subsubmenu, top: $('.header').outerHeight()});
        } else {
            $('.menu-background').css({height: h_submenu, top: $('.header').outerHeight()});
        }
        $('.menu-background').stop().slideDown(500);

    }, () => {
        $(this).find('.submenu').stop().slideUp(300);
        $('.menu-background').stop().slideUp(500);
    });
              
            
!
999px

Console