如何用css3实现一个扇形?

思路跟画实体三角形一个道理,只不过多了一个圆角属性

代码如下:

<!
DOCTYPE 
html>
<
html 
lang=
“en”
>
<
head
>     
<
meta 
charset=
“UTF-8”
>     
<
meta 
name=
“viewport” 
content=
“width=device-width, initial-scale=1.0”
>     
<
meta 
http-equiv=
“X-UA-Compatible” 
content=
“ie=edge”
>     
<
title
>c3扇形
</
title
>     
<
style
>
        
.sector
{
            
width

0
;
            
height

0
;
            
border-width

50
px
;
            
border-style
: solid;
            
border-color

#f00
 transparent transparent;
            
border-radius

50
px
        }
    
<
/
style
>
</
head
>
<
body
>     
<
div 
class=
“sector”
></
div
>
</
body
>
</
html
>