我一直在使用一個主題,試圖整理一些部分。CSS:懸停:之前不按預期工作
創建者使用:before和:after在菜單中獲得虛線的效果。問題是,當我將鼠標懸停在李它顯示了左邊的垂直線確定,但短線的鏈接消失
這裏是一個JSBIN
/* horizontal lines that disappear */
.nav-list > li .submenu > li:before,
.nav-list > li .submenu > li > ul > li:before {
content: "";
display: block;
position: absolute;
width: 9px;
left: 25px;
top: 17px;
border-top: 1px dashed rgba(255,255,255,0.5);
}
.nav-list > li .submenu > li > ul > li:before {
width: 22px;
}
/* vertical lines the stay */
.nav-list > li .submenu > li:after {
content: "";
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 22px;
width: 0;
border-left: 1px dashed rgba(255,255,255,0.5);
}
我曾試圖上懸停狀態的z-index (我自己添加了)。謝謝 – 2015-03-31 15:33:26