主要方式是采用width 为0,设置border宽度解决
代码
.div1{
position: relative;
margin: 60px;
width: 100px;height: 100px;background-color: #1e6abc;
}
.div1:after{
display:block;
content:'';
border-width:4px 5px 4px 5px;
border-style:solid;
border-color: transparent #1e6abc transparent transparent;
/* 定位 */
position:absolute;
left:-10px;
top:10px;
}
网友评论