CSS---三角的做法

阅读 90

2022-03-12

首先让 宽高必须为 0

设置透明的实线边框

boder-方位(例子: left right)-color: ;

例子:

.名 {

width: 0;

height: 0;

border: 50px solid transpare;

border-left-color: red;

}

显示为:

                        

 


        其中的                line-height: 0;

                                   font-size: 0;

                        是为了照顾兼容性

精彩评论(0)

0 0 举报