In css2, if necessary failure of some semicircular fillet or the like effect, typically through software processing such as ps, in the CSS3, it is not necessary, can be achieved only by border-radius, greatly facilitate the development of s efficiency.
Whether rounded, arc, solid circle, semicircle, implementation code is CSS3 border-radius property, can not only define the border-radius fillet radius and size, may also be drawn in various directions semicircle.
Code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS3</title>
<style>
*{margin:0;padding:0;}
ul li{list-style:none;float:left;margin-left:20px;margin-top:50px;text-align:center;}
li{background:red;}
.circle1{width:100px;height:50px;border-radius:50px 50px 0 0;line-height:50px;}
.circle3{width:100px;height:50px;border-radius:0 0 50px 50px;line-height:50px;}
.circle2{width:50px;height:100px;border-radius:0 50px 50px 0;line-height:100px;}
.circle4{width:50px;height:100px;border-radius: 50px 0 0 50px;line-height:100px;}
.circle5{width:100px;height:100px;border-radius: 50px;line-height:100px;}
</style>
</head>
<body>
<ul>
<li class="circle1">上边圆</li>
<li class="circle2">左边圆</li>
<li class="circle3">下边圆</li>
<li class="circle4">左边圆</li>
<li class="circle5">全圆</li>
</ul>
</body>
</html>
web前端开发学习Q-q-u-n:⑦⑧④-⑦⑧③-零①②,分享学习的方法和需要注意的小细节,不停更新最新的教程和学习方法(详细的前端项目实战教学视频
Results are as follows: