- margin和padding属性表示顺序为顺时针,从上面开始 border-radius属性表示顺序也为顺时针,从左上角开始
- 绘制三角形:
.triangle{
height:0;
width:0;
border-left:50px solid transparent;
border-right:50px solid transparent;
border-bottom:100px solid red;
}
效果图:
本文介绍了一种使用CSS边框属性来绘制三角形的方法。通过设置特定的边框宽度和颜色,可以轻松创建不同大小和颜色的三角形,这对于网页设计和布局非常有用。
.triangle{
height:0;
width:0;
border-left:50px solid transparent;
border-right:50px solid transparent;
border-bottom:100px solid red;
}
效果图:
4488
3595

被折叠的 条评论
为什么被折叠?