我已经在我的网站上使用了这个,但我不明白它是如何使用CSS生成箭头的。
在CSS中,似乎没有任何东西对我来说是“形状生成”。
their website上显示的默认CSS为:
.arrow_box {
position: relative;
background: #88b7d5;
border: 4px solid #c2e1f5;
}
.arrow_box:after, .arrow_box:before {
bottom: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.arrow_box:after {
border-color: rgba(136, 183, 213, 0);
border-bottom-color: #88b7d5;
border-width: 30px;
left: 50%;
margin-left: -30px;
}
.arrow_box:before {
border-color: rgba(194, 225, 245, 0);
border-bottom-color: #c2e1f5;
border-width: 36px;
left: 50%;
margin-left: -36px;
}
它是如何创建箭头的?
谢谢
发布于 2014-12-11 12:48:11
它使用“之前”和“之后”的CSS伪元素http://www.w3schools.com/css/css_pseudo_elements.asp
https://stackoverflow.com/questions/17345325
复制相似问题