如何用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: 50px; border-style: solid; border-color: #f00 transparent transparent; border-radius: 50px } </style> </head> <body> <div class="sector"></div> </body> </html>
标签:css3,sector,width,50px,如何,扇形,border,transparent 来源: https://www.cnblogs.com/akby/p/12819809.html