首页 > 技术文章 > div怎么在底部设计一个倒三角形

lushixiong 2017-04-13 15:29 原文

<style>

#triangle-down {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-top: 100px solid red;
}
</style>
<div id="triangle-down"></div>
 
 
 
.triangle {
    display: inline-block;
    width0;
    height0;
    line-height0;
    border20px solid transparent;
    border-top-color#000;
    border-bottom-width0;
}
 

 

推荐阅读