我试图改变一个带底部边框的菜单,使其有一个底部箭头。带有箭头的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
谢谢。虽然这似乎工作。底部箭头是什么意思? –