How to make an adaptive menu? Examples

– , . - , . , , .

, HTML CSS. . , HTML- .

HTML

joomla




CSS. , , .

– , . , , . – , . . , HTML- .

HTML -





, . , . , menu_icon span:nth-child(1) {top:0 px};. . .





. display: none. , CSS- : .menu__icon {display: inline-block;}. .





, . CSS , . overflow:auto; opacity:0; z-index:1000. menu__links-item, , .

, CSS . , . jQuery, , JavaScript. , :

  • (function($){$(function() $('.menu__icon').on('click', function() $(this).closest('.menu').toggleClass('menu_state_open');});});})(jQuery).

. , . , .













- . , . CSS, , , . 3 :

  1. HTML-
  2. (CSS).
  3. .

, , CMS, .

Bootstrap

, Bootstrap. . bootstrap.js. - . Bootstrap .

3

jquery




, . , nav, . container-fluid container, . .





collapse navbar-collapse, . , .

, . , . , .

Bootstrap . <li> , .





, . , . . , , . .

bootstrap




Bootstrap. , HTML CSS .

HTML- , . <ul> <li>. , CSS. , .

HTML-

adaptive dropdown menu




. 50, 75 25 %. , «».

, .

responsive menu on css




- , , . HTML, .

responsive menu on css




JQuery

JQuery. . , , . .

, .

responsive menu on css




, . : « ». HTML- nav. , , .

HTML

adaptive horizontal menu




, . , , – okayNav.

$(function(){

var navigation = $('#nav-main').okayNav();

});

. , , . , . , , .

adaptive dropdown menu




, .

Joomla

«». -, CMS. , CMS, , . , , HTML. . , .

jooble

responsive bootstrap menu




. 0 box-sizing: border-box. , . , (div) 90 % .

adaptive multi-level menu




, , , . , , . Joomla . Joomla , , . CSS, , , – . .

responsive menu




, . – , , HTML CSS.




All Articles