CSS利用border绘制图性

绘制梯形

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

绘制三角形:

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

绘制直角三角形:

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

猜你喜欢

转载自www.cnblogs.com/planetwithpig/p/11974058.html