CSS椭圆效果代码实例
分类:实例代码
CSS椭圆效果代码实例属于前端实例代码,有关更多实例代码大家可以查看。
分享一段代码实例,它实现了绘制椭圆的效果。
代码实例如下:
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="author" content="http://www.pipipi.net/" /> <title>前端教程网</title> <style type="text/css"> .box { width: 200px; height: 200px; padding: 10px; margin: 10px 20px; } .ellipse { border-radius: 50%; background: yellow; height: 150px; margin-top: 55px; } </style> </head> <body> <div class="box ellipse"></div> </body> </html>
border-radius属性可以参阅CSS3 border-radius一章节。
CSS椭圆效果代码实例,这样的场景在实际项目中还是用的比较多的,关于CSS椭圆效果代码实例就介绍到这了。