<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.big{
width: 400px;
height: 400px;
background-color: yellow;
display: flex;
border-radius: 50%;
/* background: -webkit-radial-gradient(circle, red, yellow, green); */
background: -webkit-linear-gradient(left top, red , blue);
animation: rotate_sjx 1s linear infinite;
}
.box{
width: 300px;
height: 300px;
background-color: black;
border-radius: 50%;
position: relative;
margin: auto;
box-shadow: 0px 0px 10px 10px red,0 0 20px 10px blue;
}
.b{
height: 300px;
width: 150px;
background-color: white;
border-radius: 150px 0 0 150px;
}
div .white{
height: 150px;
width: 150px;
background-color: white;
border-radius: 50%;
position: absolute;
top: 0px;
left: 80px;
}
div .black{
height: 150px;
width: 150px;
background-color: black;
border-radius: 50%;
position: absolute;
bottom: 0px;
left: 80px;
}
.white .littleBlack{
width: 45px;
height: 45px;
background-color: black;
border-radius: 50%;
position: absolute;
left: 50px;
top: 50px;
}
.black .littleWhite{
width: 45px;
height: 45px;
background-color: white;
border-radius: 50%;
position: absolute;
left: 50px;
top: 50px;
}
@keyframes rotate_sjx{
form{
transform: rotate(0deg);
}
to{
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div class="big">
<div class="box">
<div class="b"></div>
<div class="white">
<div class="littleBlack"></div>
</div>
<div class="black">
<div class="littleWhite"></div>
</div>
</div>
</div>
</body>
</html>
不明白的可以私