CSS利用border绘制图性

sdbxpjzq 2019-12-03

绘制梯形

CSS利用border绘制图性

width:10px;
border-top:10px solid red;
border-right:10px solid transparent;
border-left:10px solid transparent;
border-bottom:10px solid transparent;

绘制三角形:

CSS利用border绘制图性

width:0px;
border-top:10px solid red;
border-right:10px solid transparent;
border-left:10px solid transparent;
border-bottom:10px solid transparent;

绘制直角三角形:

CSS利用border绘制图性

width:0px;
border-top:20px solid red;
border-right:0px solid transparent;
border-left:10px solid transparent;
border-bottom:10px solid transparent;

相关推荐

aSuncat / 0评论 2020-08-18