<html>
<style>
.circle1 {//上半圆
width: 100px;
height: 50px;
border-radius: 50px 50px 0 0;
line-height: 50px;
}
.circle2 {//右半圆
width: 50px;
height: 100px;
border-radius: 0 50px 50px 0;
line-height: 100px;
}
.circle3 {//下半圆
width: 100px;
height: 50px;
border-radius: 0 0px 50px 50px;
line-height: 50px;
}
.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;
}
.demo { /*左半圆*/
position:absolute; /*clip 属性剪裁绝对定位元素。也就是说,只有 position:absolute 的时候才是生效的。*/
width: 100px;
height: 100px;
border-radius: 50px;
/* line-height: 50px; */
clip: rect(0px 50px 100px 0px); /*唯一合法的形状值是:rect (top, right, bottom, left)*/
}
.right-circle { /*右半圆*/
left: 200px;
clip: rect(0px 100px 100px 50px); /*唯一合法的形状值是:rect (top, right, bottom, left)*/
}
</style>
</html>