HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<h1 style="text-align:center"><a href="https://wpcraft.top/?p=3215" target="_blank">Dropdown list of categories with images</a></h1>
<h2 style="text-align:center">changes at screen width 1240px</h2>
<div class="top-nav"><ul class="top-nav__ul-ul"><li class="top-nav__li-li"><a href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/" class="top-nav__ul-a"><span class="top-nav__ul-a-img"><img src="http://jeelex-ural.ru/wp-content/uploads/2022/08/komplektuyushhie_k_nasosnomu_oborudovaniyu.svg"></span><span class="top-nav__ul-a-title">Комплектующие к насосному оборудованию</span></a>
<div class="x-open-cat"></div>
<div class="top-nav__subnav sub_menu">
<ul class="top-nav__submenu">
<li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/uzh-shlangi-i-komplekty-dlya-vsasyvaniya/">
<span class="top-nav__ul-a-title">«УЖ» шланги и комплекты для всасывания</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/3-h-4-h-i-5-ti-vyvodnye-shtucery/">
<span class="top-nav__ul-a-title">3-х, 4-х и 5-ти выводные штуцеры</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/blok-avtomatiki/">
<span class="top-nav__ul-a-title">Блок автоматики</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/vodozabornyj-filtr/">
<span class="top-nav__ul-a-title">Водозаборный фильтр</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/demonstracionnyj-komplekt-dlya-skvazhinnyh-nasosov/">
<span class="top-nav__ul-a-title">Демонстрационный комплект для скважинных насосов</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/klapan-slivnoj-pro-32h1-p/">
<span class="top-nav__ul-a-title">Клапан сливной ПРО 32х1”П</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/kljuch-dlya-fitingov/">
<span class="top-nav__ul-a-title">Ключ для фитингов</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/komplekt-krot/">
<span class="top-nav__ul-a-title">Комплект «КРОТ»</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/komplekt-avtomatiki-na-bake-kab/">
<span class="top-nav__ul-a-title">Комплект автоматики на баке «КАБ»</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/kronshtejn-dlya-nasosnyh-stancij-s-bakom-24-l/">
<span class="top-nav__ul-a-title">Кронштейн для насосных станций с баком 24 л</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/kronshtejn-dlya-rasshiritelnyh-bakov/">
<span class="top-nav__ul-a-title">Кронштейн для расширительных баков</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/manometr/">
<span class="top-nav__ul-a-title">Манометр</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/membrany/">
<span class="top-nav__ul-a-title">Мембраны</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/oborudovanie-dlya-obustrojstva-skvazhin-i-kolodcev/">
<span class="top-nav__ul-a-title">Оборудование для обустройства скважин и колодцев</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/obratnyj-klapan-latun/">
<span class="top-nav__ul-a-title">Обратный клапан (латунь)</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/podstavka-dlya-realizacii-cirkulyacionnyh-nasosov/">
<span class="top-nav__ul-a-title">Подставка для реализации циркуляционных насосов</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/rele-davleniya/">
<span class="top-nav__ul-a-title">Реле давления</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/slivnoj-klapan-32/">
<span class="top-nav__ul-a-title">Сливной клапан 32</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/termousadochnyj-nabor-dlya-elektricheskogo-kabelya/">
<span class="top-nav__ul-a-title">Термоусадочный набор для электрического кабеля</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/truby-pnd/">
<span class="top-nav__ul-a-title">Трубы ПНД</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/universalnyj-poplavkovyj-vykljuchatel/">
<span class="top-nav__ul-a-title">Универсальный поплавковый выключатель</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/fitingi-dlya-trub-pnd/">
<span class="top-nav__ul-a-title">Фитинги для труб ПНД</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/fitingi-dlya-shlanga-udav/">
<span class="top-nav__ul-a-title">Фитинги для шланга «УДАВ»</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/flanec-ga-24-150-l-plastikovyj/">
<span class="top-nav__ul-a-title">Фланец ГА 24-150 л. пластиковый</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/shlang-tf-800/">
<span class="top-nav__ul-a-title">Шланг TF 800</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/shlang-i-udlinitel-shlanga-udav/">
<span class="top-nav__ul-a-title">Шланг и удлинитель шланга «УДАВ»</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/komplektujushhie-k-nasosnomu-oborudovaniju/shtucer-1-ph1-p/">
<span class="top-nav__ul-a-title">Штуцер 1”Пх1”П</span>
</a> </li></ul>
</div>
</li><li class="top-nav__li-li"><a href="http://jeelex-ural.ru/product-category/korpusa-dlya-kartridzhnogo-filtra/" class="top-nav__ul-a"><span class="top-nav__ul-a-img"><img src="http://jeelex-ural.ru/wp-content/uploads/2022/08/korpusa_dlya_kartridzhnogo_filtra.svg"></span><span class="top-nav__ul-a-title">Корпуса для картриджного фильтра</span></a>
<div class="x-open-cat"></div>
<div class="top-nav__subnav sub_menu">
<ul class="top-nav__submenu">
<li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/korpusa-dlya-kartridzhnogo-filtra/dvuhstupenchatye-korpusa-dlya-kartridzhnogo-filtra/">
<span class="top-nav__ul-a-title">Двухступенчатые</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/korpusa-dlya-kartridzhnogo-filtra/odnostupenchatye-korpusa-dlya-kartridzhnogo-filtra/">
<span class="top-nav__ul-a-title">Одноступенчатые</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/korpusa-dlya-kartridzhnogo-filtra/trehstupenchatye/">
<span class="top-nav__ul-a-title">Трехступенчатые</span>
</a> </li></ul>
</div>
</li><li class="top-nav__li-li"><a href="http://jeelex-ural.ru/product-category/sistema-krab-i-krab-t-2/" class="top-nav__ul-a"><span class="top-nav__ul-a-img"><img src="http://jeelex-ural.ru/wp-content/uploads/2022/08/sistema_krab_i_krab_t.svg"></span><span class="top-nav__ul-a-title">Система «КРАБ» и «КРАБ T»</span></a>
<div class="x-open-cat"></div>
<div class="top-nav__subnav sub_menu">
<ul class="top-nav__submenu">
<li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/sistema-krab-i-krab-t-2/sistema-krab-t-sistema-krab-i-krab-t-2/">
<span class="top-nav__ul-a-title">Система «КРАБ - Т»</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/sistema-krab-i-krab-t-2/sistema-krab/">
<span class="top-nav__ul-a-title">Система «КРАБ»</span>
</a> </li></ul>
</div>
</li><li class="top-nav__li-li"><a href="http://jeelex-ural.ru/product-category/cirkulyacionnye-nasosy/" class="top-nav__ul-a"><span class="top-nav__ul-a-img"><img src="http://jeelex-ural.ru/wp-content/uploads/2022/08/czirkulyaczionnye_nasosy.svg"></span><span class="top-nav__ul-a-title">Циркуляционные насосы</span></a></li><li class="top-nav__li-li"><a href="http://jeelex-ural.ru/product-category/pogruzhnye-drenazhnye-i-fekalnye-nasosy/" class="top-nav__ul-a"><span class="top-nav__ul-a-img"><img src="http://jeelex-ural.ru/wp-content/uploads/2022/08/pogruzhnye_drenazhnye_nasosy.svg"></span><span class="top-nav__ul-a-title">Погружные дренажные и фекальные насосы</span></a>
<div class="x-open-cat"></div>
<div class="top-nav__subnav sub_menu">
<ul class="top-nav__submenu">
<li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/pogruzhnye-drenazhnye-i-fekalnye-nasosy/pogruzhnye-drenazhnye-nasosy/">
<span class="top-nav__ul-a-title">Погружные дренажные насосы</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/pogruzhnye-drenazhnye-i-fekalnye-nasosy/pogruzhnye-fekalnye-nasosy/">
<span class="top-nav__ul-a-title">Погружные фекальные насосы</span>
</a> </li></ul>
</div>
</li><li class="top-nav__li-li"><a href="http://jeelex-ural.ru/product-category/poverhnostnye-nasosy/" class="top-nav__ul-a"><span class="top-nav__ul-a-img"><img src="http://jeelex-ural.ru/wp-content/uploads/2022/08/Poverkhnostnye-nasosy-avtomaty-VIKHREVIK-s-gidroakkumuliatorom.svg"></span><span class="top-nav__ul-a-title">Поверхностные насосы</span></a>
<div class="x-open-cat"></div>
<div class="top-nav__subnav sub_menu">
<ul class="top-nav__submenu">
<li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/poverhnostnye-nasosy/poverhnostnye-nasosy-dzhambo/">
<span class="top-nav__ul-a-title">Поверхностные насосы «ДЖАМБО»</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/poverhnostnye-nasosy/poverhnostnye-nasosy-avtomaty-vihrevik-s-gidroakkumulyatorom/">
<span class="top-nav__ul-a-title">Поверхностные насосы-автоматы «ВИХРЕВИК» с гидроаккумулятором</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/poverhnostnye-nasosy/poverhnostnye-nasosy-avtomaty-dzhambo-komfort/">
<span class="top-nav__ul-a-title">Поверхностные насосы-автоматы «ДЖАМБО» Комфорт</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/poverhnostnye-nasosy/poverhnostnye-nasosy-avtomaty-dzhambo-s-gidroakkumulyatorom/">
<span class="top-nav__ul-a-title">Поверхностные насосы-автоматы «ДЖАМБО» с гидроаккумулятором</span>
</a> </li></ul>
</div>
</li><li class="top-nav__li-li"><a href="http://jeelex-ural.ru/product-category/gidroakkumulyatory-i-rasshiritelnye-baki/" class="top-nav__ul-a"><span class="top-nav__ul-a-img"><img src="http://jeelex-ural.ru/wp-content/uploads/2022/08/gidroakkumulyatory.svg"></span><span class="top-nav__ul-a-title">Гидроаккумуляторы и расширительные баки</span></a>
<div class="x-open-cat"></div>
<div class="top-nav__subnav sub_menu">
<ul class="top-nav__submenu">
<li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/gidroakkumulyatory-i-rasshiritelnye-baki/gidroakkumulyatory/">
<span class="top-nav__ul-a-title">Гидроаккумуляторы</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/gidroakkumulyatory-i-rasshiritelnye-baki/rasshiritelnye-baki/">
<span class="top-nav__ul-a-title">Расширительные баки</span>
</a> </li></ul>
</div>
</li><li class="top-nav__li-li"><a href="http://jeelex-ural.ru/product-category/pogruzhnye-skvazhinnye-nasosy/" class="top-nav__ul-a"><span class="top-nav__ul-a-img"><img src="http://jeelex-ural.ru/wp-content/uploads/2022/08/pogruzhnye_nasosy_vodomet_3d.svg"></span><span class="top-nav__ul-a-title">Погружные скважинные насосы</span></a>
<div class="x-open-cat"></div>
<div class="top-nav__subnav sub_menu">
<ul class="top-nav__submenu">
<li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/pogruzhnye-skvazhinnye-nasosy/pogruzhnye-vibracionnye-nasosy-kachan/">
<span class="top-nav__ul-a-title">Погружные вибрационные насосы «КАЧАН»</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/pogruzhnye-skvazhinnye-nasosy/pogruzhnye-nasosy-vodomet-3d/">
<span class="top-nav__ul-a-title">Погружные насосы «ВОДОМЕТ 3Д»</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/pogruzhnye-skvazhinnye-nasosy/pogruzhnye-nasosy-vodomet-a-dlya-kolodca/">
<span class="top-nav__ul-a-title">Погружные насосы «ВОДОМЕТ» А для колодца</span>
</a>
</li><li class="top-nav__li-li">
<a class="top-nav__ul-a" href="http://jeelex-ural.ru/product-category/pogruzhnye-skvazhinnye-nasosy/pogruzhnye-nasosy-vodomet-dlya-skvazhiny/">
<span class="top-nav__ul-a-title">Погружные насосы «ВОДОМЕТ» для скважины</span>
</a> </li></ul>
</div>
</li></ul></div>
/* ## Раскрывающиеся списки категорий 2 */
.top-nav__ul-ul {
display: flex;
max-width: none;
flex-wrap: wrap;
list-style: none;
margin: 0;
}
.top-nav__li-li {
position: relative;
width: 25%;
padding: 0 30px 39px 0;
}
@media only screen and (max-width: 1559px){
.top-nav__li-li {
padding-bottom: 20px;
}
}
.top-nav .top-nav__ul-a {
font-size: 18px;
display: flex;
color: #238ac0;
flex-wrap: wrap;
justify-content: center;
}
.top-nav__ul-a-img {
display: flex;
width: 115px;
height: 100px;
margin-bottom: 15px;
align-items: center;
justify-content: center;
}
.top-nav__ul-a-img img {
height: 100%;
max-width: 100%;
}
.top-nav__ul-a-title {
width: 100%;
text-align: center;
font-weight: 600;
line-height: 1.2;
}
@media(min-width: 1240px){
.top-nav__ul-ul>.top-nav__li-li:hover .top-nav__subnav {
display: block;
opacity: 1;
}
.top-nav__ul-ul .top-nav__li-li:nth-child(4n - 1) .top-nav__subnav,
.top-nav__ul-ul .top-nav__li-li:nth-child(4n) .top-nav__subnav {
left: auto;
right: 100%;
}
.top-nav__ul-ul .top-nav__li-li:nth-child(4n - 1) .top-nav__subnav:before,
.top-nav__ul-ul .top-nav__li-li:nth-child(4n) .top-nav__subnav:before {
left: auto;
right: -14px;
box-shadow: 6px -4px 5px 0px rgb(0 0 0 / 2%);
}
}
.top-nav__submenu {
list-style: none;
margin: 0;
height: 300px;
padding: 20px;
overflow: auto;
}
.top-nav__submenu::-webkit-scrollbar {
width: 8px;
background: #f1f1f1;
}
.top-nav__submenu::-webkit-scrollbar-button {
background: #ffffff;
height: 20px;
}
.top-nav__submenu::-webkit-scrollbar-track {
}
.top-nav__submenu::-webkit-scrollbar-thumb {
width: 6px;
background: #238ac0;
border-radius: 5px;
height: 40%;
}
.top-nav__submenu .top-nav__ul-a-title {
text-align: left;
font-size: 15px;
}
.top-nav__submenu li {
width: 100%;
margin-bottom: 15px;
padding: 0;
}
.top-nav__subnav {
display: none;
opacity: 0;
position: absolute;
top: 115px;
transform: translateY(-50%);
left: 89%;
min-width: 292px;
max-height: 300px;
z-index: 1;
border: 1px solid #f1f1f1;
box-shadow: 4px 4px 25px rgb(0 0 0 / 15%);
background: #fff;
-webkit-transition: opacity .5s ease;
-moz-transition: opacity .5s ease;
-ms-transition: opacity .5s ease;
-o-transition: opacity .5s ease;
transition: opacity .5s ease;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
}
.top-nav__subnav:before {
content: '';
position: absolute;
top: 30%;
left: -14px;
margin-top: -15px;
width: 30px;
height: 30px;
z-index: -1;
transform: rotate(45deg);
box-shadow: -6px 4px 5px 0px rgb(0 0 0 / 2%);
background: #fff;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
}
@media(max-width: 1239px){
.top-nav__subnav {
padding-bottom: 2rem;
min-width: 240px;
border: none;
}
.top-nav__subnav:before {
content: none;
}
.top-nav__li-li {
padding-right: 30px;
}
.top-nav__li-li {width: 33%;}
.x-open-cat {
position: absolute;
display: block;
top: 15px;
right: 7px;
width: 20px;
height: 20px;
margin: 0 auto;
cursor: pointer;
z-index: 1;
-webkit-transition: all .25s ease;
-o-transition: all .25s ease;
transition: all .25s ease;
}
.x-open-cat::before {
top: 8px;
left: 0;
width: 100%;
height: 3px;
}
.x-open-cat::after {
top: 0;
left: 8px;
width: 3px;
height: 100%;
transition: .4s;
}
.x-open-cat::before,
.x-open-cat::after {
content: '';
position: absolute;
background: #0c71a9;
}
.x-open-cat.active::after {
transform: rotate(90deg);
}
.x-open-cat.active ~ .top-nav__subnav {
position:relative;
display: block;
opacity: 1;
top: 30%;
left: 0;
box-shadow: none;
height: auto;
max-height: 300px;
}
.top-nav__submenu {
height: auto;
max-height: 300px;
}
}
@media(max-width: 799px){
.top-nav__li-li {width: 50%;}
.x-open-cat.active ~ .top-nav__subnav {top: 35%;}
}
@media(max-width: 599px){
.top-nav__li-li {width: 100%;}
.x-open-cat.active ~ .top-nav__subnav {top: 38%;}
}
/* end Категории 2 */
document.addEventListener('DOMContentLoaded', function(){
// Класс active для категорий из шорткода-2 (категории с картинками)
var xOpenCat = document.querySelectorAll('.x-open-cat');
xOpenCat.forEach(function(element, index, arr){
element.addEventListener('click', function(event){
element.classList.toggle('active');
});
});
});
Also see: Tab Triggers