效果:
代码:
div {
background-color: whitesmoke;
border: 2px solid #eee;
border-top: 0;
width:100px;
height:100px;
position:relative;
}
div:before {
content:"";
width:0;
height:0;
position:absolute;
left:100px;
top:18px;
border-left:solid 12px transparent;
border-top:solid 12px black;
border-right:solid 12px transparent;
border-bottom:solid 12px black;
}
div:after{
content:"";
width:0;
height:0;
position:absolute;
left:100px;
top:20px;
border-left:solid 10px transparent;
border-top:solid 10px white;
border-right:solid 10px transparent;
border-bottom:solid 10px white; /* 白色小三角形 */
}