我想要第三个子菜单,但我不想要确切地需要添加哪些代码,因为我认为我有第三个子菜单的代码但不太可能不起作用。
.menu ul {
margin: 0;
padding: 0;
list-style-type: none;
position: relative;
overflow: inherit;
z-index: 1000;
width:1010px;
}
.menu ul li {
position: relative;
display: inline-block;
padding: 0;
margin-left: 60px;
}
.menu ul li a {
display: block;
text-decoration: none;
text-transform: uppercase;
font-size: 13px;
font-weight: 900;
color: #fff;
-webkit-transition: all 200ms ease-in;
-o-transition: all 200ms ease-in;
-moz-transition: all 200ms ease-in;
position: relative;
}
.menu ul li a:before {
display: block;
position: absolute;
width: 4px;
height: 4px;
top: 11px;
left: -32px;
background: #3d3d3d;
/* Rotate */
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
/* Rotate Origin */
-webkit-transform-origin: 0 100%;
-moz-transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-o-transform-origin: 0 100%;
transform-origin: 0 100%;
}
.menu ul li:first-child a:before,
.menu ul ul li a:before {
display: none
}
.menu ul li.active a,
.menu ul li a:hover,
.menu ul li a.selected {
color: #ff6760
}
.menu ul li ul {
position: absolute;
left: 0;
display: none;
visibility: hidden;
width: 168px;
padding: 10px 0 0 0;
}
.menu ul li ul:before {
content: "";
width: 0;
display: block;
position: absolute;
height: 10px;
top: 0;
left: 15px;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid #ff6760;
}
.menu ul li ul li {
display: list-item;
margin: 0;
border-top: 1px solid #313131;
background: #3d3d3d;
}
.menu ul li ul li:first-child {
border-top: 2px solid #ff6760
}
.menu ul li ul li ul {
top: 0
}
.menu ul li ul li a {
margin: 0;
border: none;
padding: 13px;
line-height: 1;
font-size: 11px;
color: #dfdfdf;
}
.menu ul li.active ul li a {
color: #dfdfdf
}
.menu ul li ul li a:hover {
background-color: #ff6760;
color: #FFF;
border: none;
}
.menu ul li.active ul li a,
.menu ul li ul li a:hover,
.menu ul li ul li a.selected {
border: none
}
* html .menu {
height: 1%
}
.selectnav {
display: none;
width: 280px;
margin: 0 auto;
background: transparent url(style/images/dropdown-arrow.png) no-repeat right center;
border-radius: 0;
border: 0;
background-color: #ebebeb;
max-width: 100%;
padding: 7px 10px;
line-height: 20px;
background-size: 30px 28px;
-webkit-appearance: none;
}
@media only screen and (-Webkit-min-device-pixel-ratio: 1.5), only screen and (-moz- min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (min-device-pixel-ratio: 1.5) {
.selectnav {
background-image: url(style/images/dropdown-arrow@2x.png)
}
}
and html :
<li><a href="#">Naše herne</a>
<ul>
<li><a href="#">HerĹa 1</a>
<ul>
<li><a href="#">Fotogálerie</a></li>
<li><a href="#">Kontakt</a></li>
<li><a href="#">Ponuka práce</a></li>
<li><a href="#">Novinky</a></li>
</ul>
</li>
<li><a href="#">HerĹa 2</a>
<ul>
<li><a href="#">Fotogálerie</a></li>
<li><a href="#">Kontakt</a></li>
<li><a href="#">Ponuka práce</a></li>
<li><a href="#">Novinky</a></li>
</ul>
</li>
<li><a href="#">HerĹa 3</a>
<ul>
<li><a href="#">Fotogálerie</a></li>
<li><a href="#">Kontakt</a></li>
<li><a href="#">Ponuka práce</a></li>
<li><a href="#">Novinky</a></li>
</ul>
</li>
</ul>
</li>
所以,正如你所看到的,我有第三个子菜单的 css 代码,但没有工作,我不知道为什么,但我自己不能让它工作,所以我想在这里问。