举例
这是一颗小爱心哦
<div class="heart-solid icon"></div>
css
.heart-solid.icon {
color: #000;
position: absolute;
margin-top: 6px;
margin-left: 5px;
width: 9px;
height: 9px;
border-left: solid 1px currentColor;
border-bottom: solid 1px currentColor;
background-color: currentColor;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.heart-solid.icon:before {
content: '';
position: absolute;
top: -5px;
left: -1px;
width: 8px;
height: 5px;
border-radius: 5px 5px 0 0;
border-top: solid 1px currentColor;
border-left: solid 1px currentColor;
border-right: solid 1px currentColor;
background-color: currentColor;
}
.heart-solid.icon:after {
content: '';
position: absolute;
top: 0px;
left: 8px;
width: 5px;
height: 8px;
border-radius: 0 5px 5px 0;
border-top: solid 1px currentColor;
border-right: solid 1px currentColor;
border-bottom: solid 1px currentColor;
background-color: currentColor;
}