ylqymm

Results 1 comments of ylqymm

以尖角朝下的三角形为例: - html ```html ``` - css ```css .box{ width: 0; height: 0; border: 10px solid transparent; border-top-color: skyblue; } ``` **效果图**: ![](https://img-blog.csdnimg.cn/20200520092603740.png) **解析**: - 让容器的宽高都为0, - 设置三角形的大小(设置border的像素,颜色设为透明), - 如果想让尖角朝下,就设置border-top-color即可(与实际方向是反的,因为透明的原因);如果想让尖角超左,设置border-right-color即可。