🚧 [megamenu] Working on menus
This commit is contained in:
parent
350c750e16
commit
1749e10c26
6 changed files with 89 additions and 81 deletions
|
|
@ -1,26 +1,3 @@
|
|||
/* Mobile first layout SmartMenus Core CSS (it's not recommended editing these rules)
|
||||
You need this once per page no matter how many menu trees or different themes you use.
|
||||
-------------------------------------------------------------------------------------------*/
|
||||
|
||||
.megamenu {
|
||||
background: #eee;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-ms-border-radius: 5px;
|
||||
-o-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.megamenu {
|
||||
-webkit-border-radius: 50px;
|
||||
-moz-border-radius: 50px;
|
||||
-ms-border-radius: 50px;
|
||||
-o-border-radius: 50px;
|
||||
border-radius: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.megamenu:after {
|
||||
clear: both;
|
||||
content: "\00a0";
|
||||
|
|
@ -28,34 +5,23 @@
|
|||
height: 0;
|
||||
font: 0px/0 serif;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.nav-brand {
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.nav-brand a {
|
||||
display: block;
|
||||
padding: 12px 12px 12px 20px;
|
||||
color: #555;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-size: 22px;
|
||||
font-weight: normal;
|
||||
line-height: 17px;
|
||||
text-decoration: none;
|
||||
}
|
||||
}/*
|
||||
@media (min-width: 768px) {
|
||||
.megamenu {
|
||||
position: relative;
|
||||
}
|
||||
}*/
|
||||
|
||||
.megamenu-menu {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
}/*
|
||||
@media (min-width: 768px) {
|
||||
.megamenu-menu {
|
||||
float: right;
|
||||
clear: none;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
/* Mobile menu toggle button */
|
||||
|
||||
|
|
@ -72,6 +38,13 @@
|
|||
cursor: pointer;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
/* Hide the button in desktop view */
|
||||
.megamenu-btn {
|
||||
position: absolute;
|
||||
top: -99999px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hamburger icon */
|
||||
|
||||
|
|
@ -87,13 +60,11 @@
|
|||
-webkit-transition: all 0.25s;
|
||||
transition: all 0.25s;
|
||||
}
|
||||
|
||||
.megamenu-btn-icon:before {
|
||||
content: '';
|
||||
top: -7px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.megamenu-btn-icon:after {
|
||||
content: '';
|
||||
top: 7px;
|
||||
|
|
@ -106,13 +77,11 @@
|
|||
height: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.megamenu-state:checked ~ .megamenu-btn .megamenu-btn-icon:before {
|
||||
top: 0;
|
||||
-webkit-transform: rotate(-45deg);
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.megamenu-state:checked ~ .megamenu-btn .megamenu-btn-icon:after {
|
||||
top: 0;
|
||||
-webkit-transform: rotate(45deg);
|
||||
|
|
@ -137,28 +106,19 @@
|
|||
.megamenu-state:not(:checked) ~ .megamenu-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.megamenu-state:checked ~ .megamenu-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
/* Hide the button in desktop view */
|
||||
.megamenu-btn {
|
||||
position: absolute;
|
||||
top: -99999px;
|
||||
}
|
||||
/* Always show the menu in desktop view */
|
||||
.megamenu-state:not(:checked) ~ .megamenu-menu {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* Core */
|
||||
|
||||
|
||||
|
||||
|
||||
.sm{box-sizing:border-box;position:relative;z-index:9999;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
||||
.sm{box-sizing:border-box;z-index:9999;-webkit-tap-highlight-color:rgba(0,0,0,0);}
|
||||
.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;}
|
||||
.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right;}
|
||||
.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0;}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue