css畫一個三角形
阿新 • • 發佈:2021-01-30
<style> .triangle1 { width: 0; height: 0; border-style: solid; border-width: 0 25px 40px 25px; border-color: transparent transparent red transparent; } .triangle2 { width: 0; height: 0; border-style: solid; border-width: 40px 25px 0 25px; border-color: red transparent transparent transparent; } </style> <div class="triangle1"></div> <div class="triangle2"></div>