画三角形

时间:2021-06-28 19:45:26   收藏:0   阅读:0

div{
width: 0px;
border: 30px solid transparent;
border-left-color: tomato;
}

第二种方法

div{
margin: auto;
width: 0px;
border-top: 20px solid transparent;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-bottom: 20px solid red;
}

评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!