<!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>ikun</title>
</head>
<body>
<div class="containner">
<div class="circle_top">
<div class="box_left"></div>
<div class="box_right"></div>
</div>
<div class="circle_bottom"> </div>
</div>
</body>
<style>
.containner{
width: 200px;
height: 200px;
margin: 60px auto;
/* background-color: aqua; */
}
.circle_top{
border: 1px solid gray;
/* border-radius: 50%; */
border-radius: 100px 100px 0 0;
width: 200px;
height: 100px;
background-color: black;
position: relative;
}
.circle_bottom{
border: 1px solid gray;
/* border-radius: 50%; */
border-radius:0 0 100px 100px;
width: 200px;
height: 100px;
margin: 10px auto;
background-color: gray;
}
.box_left{
height: 105px;
width: 10px;
background-color: white;
position: absolute;
border-radius: 5px;
bottom: -10px;
transform: translateX(60px) rotate(-20deg);
}
.box_right{
height: 105px;
width: 10px;
background-color: white;
border-radius: 5px;
bottom: -10px;
position: absolute;
transform: translateX(130px) rotate(20deg);
}
</style>
<script>
</script>
</html>
升级版
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>💗</title>
<style>
html,
body {
height: 100%;
padding: 0;
margin: 0;
background: #000;
}
canvas {
position: absolute;
width: 100%;
height: 100%;
animation: anim 1.5s ease-in-out infinite;
-webkit-animation: anim 1.5s ease-in-out infinite;
-o-animation: anim 1.5s ease-in-out infinite;
-moz-animation: anim 1.5s ease-in-out infinite;
}
#name {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin-top: -20px;
font-size: 46px;
color: #ea80b0;
}
@keyframes anim {
0% {
transform: scale(0.8);
}
25% {
transform: scale(0.7);
}
50% {
transform: scale(1);
}
75% {
transform: scale(0.7);
}
100% {
transform: scale(0.8);
}
}
@-webkit-keyframes anim {
0% {
-webkit-transform: scale(0.8);
}
25% {
-webkit-transform: scale(0.7);
}
50% {
-webkit-transform: scale(1);
}
75% {
-webkit-transform: scale(0.7);
}
100% {
-webkit-transform: scale(0.8);
}
}
@-o-keyframes anim {
0% {
-o-transform: scale(0.8);
}
25% {
-o-transform: scale(0.7);
}
50% {
-o-transform: scale(1);
}
75% {
-o-transform: scale(0.7);
}
100% {
-o-transform: scale(0.8);
}
}
@-moz-keyframes anim {
0% {
-moz-transform: scale(0.8);
}
25% {
-moz-transform: scale(0.7);
}
50% {
-moz-transform: scale(1);
}
75% {
-moz-transform: scale(0.7);
}
100% {
-moz-transform: scale(0.8);
}
}
</style>
<style>
.bg{
background-color: black;
width: 200px;
height: 210px;
margin: 60px auto;
border-radius: 50%;
overflow: hidden;
animation: anim 1.5s ease-in-out infinite;
/* padding-top: 10px; */
}
.containner{
width: 200px;
height: 210px;
margin: auto;
/* margin: 60px auto; */
background-color:white;
border-radius: 50%;
/* background-color: aqua; */
}
.circle_top{
border: 1px solid gray;
/* border-radius: 50%; */
border-radius: 100px 100px 0 0;
width: 200px;
height: 100px;
background-color: black;
position: relative;
}
.circle_bottom{
border: 1px solid gray;
/* border-radius: 50%; */
border-radius:0 0 100px 100px;
width: 200px;
height: 100px;
margin: 10px auto;
background-color: gray;
}
.box_left{
height: 105px;
width: 10px;
background-color: white;
position: absolute;
border-radius: 5px;
bottom: -10px;
transform: translateX(60px) rotate(-20deg);
}
.box_right{
height: 105px;
width: 10px;
background-color: white;
border-radius: 5px;
bottom: -10px;
position: absolu