利用矩形的border边框来实现三角形的样式
第一步:创建一个带有边框的div:
width: 40px;
height: 40px;
border: 40px solid;
border-color: red blue orange yellowgreen;
第二步:将div的长宽设为0px
width: 0px;
height: 0px;
border: 40px solid;
border-color: red blue orange yellowgreen;
第三步:将其他三边的边框设为透明的
width: 0px;
height: 0px;
border: 40px solid;
border-color: red transparent transparent transparent;
利用css制作一个三角形
最新推荐文章于 2023-04-11 10:00:22 发布