我試圖改變一個帶底部邊框的菜單,使其有一個底部箭頭。帶有箭頭的Jquery magicline
例如爲:http://i.imgur.com/3onjcjV.png
https://css-tricks.com/jquery-magicline-navigation/¨
#magic-line {
position: absolute;
bottom: -2px;
left: 0;
width: 100px;
height: 2px;
background: #fe4902;
}
試過以下,但它不工作。
#magic-line {
position: relative;
background: #fff;
border: 1px solid #999;
}
#magic-line:after, #magic-line:before {
bottom: 100%;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
#magic-line:after {
border-color: rgba(255, 255, 255, 0);
border-bottom-color: #fff;
border-width: 10px;
margin-left: -10px;
}
#magic-line:before {
border-color: rgba(153, 153, 153, 0);
border-bottom-color: #999;
border-width: 11px;
margin-left: -11px;
}
https://jsfiddle.net/0shrxyee/
我們將需要看到一些比這更多的代碼。你可以添加你的JS或更好,但把它放在plunker/jsbin/codepen(無論你喜歡哪種服務) –
https://jsfiddle.net/0shrxyee/ – John
謝謝。雖然這似乎工作。底部箭頭是什麼意思? –