1)
如何通过CSS画带有阴影的实心圆
height: 50px;
background-color: yellow;
border-radius: 25px;
box-shadow: 5px 5px 5px #888888;
div{
width: 50px;
height: 50px;
border: 1px blue solid;
border-radius: 25px;
div{
width: 50px;
height: 50px;
border: 1px blue dashed;
border-radius: 25px;
div{
width: 50px;
height: 50px;
background-color: blue;
border-radius: 50px 0 0 0;
div{
width: 50px;height: 50px;
background-color: yellow;
border-radius: 25px;
box-shadow: 5px 5px 5px #888888;
}
div{
width: 50px;
height: 50px;
border: 1px blue solid;
border-radius: 25px;
}
div{
width: 50px;
height: 50px;
border: 1px blue dashed;
border-radius: 25px;
}
div{
width: 50px;
height: 50px;
background-color: blue;
border-radius: 50px 0 0 0;
}
5) 半圆:高度设置为宽度的一半,border-radius设置为宽高的一半,并且只设置两个半径
6)月亮
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>月亮</title>
<style>
.test{
background-color: black;
width: 120px;
height: 120px;
}
.cir1{
width: 100px;
height: 100px;
border-radius: 50px;
background-color: white;
float: left;
position: relative;
}
.cir2{
width: 96px;
height: 96px;
border-radius: 48px;
background-color: black;
float: left;
position: absolute;
margin-left: 20px;
}
</style>
</head>
<body>
<div class="test">
<div class="cir1"></div>
<div class="cir2"></div>
</div>
</body>
</html>