1. 程式人生 > >css實現圓、三角形

css實現圓、三角形

 

<div class="circular">
    circular
</div>
* { padding: 0; margin: 0;}
.circular{
    width: 200px;
    height: 200px;
    border: solid 1px black;
    border-radius: 100%;
}

<div class="triangle">
</div>
* { padding: 0; margin: 0;}
.triangle{
    height:0;
    width:0;
    overflow: hidden;
    border-color:#FF9600 transparent transparent transparent;
    border-style:solid;
    border-width:200px;
}