【发布时间】:2018-06-22 07:22:32
【问题描述】:
我想用纯CSS复制下面的gif动画,有可能吗,怎么做?我也愿意接受其他合适的方法。
下面的 sn-p 是我目前所拥有的,它只是一张静态的脸。
body {
background: #fff;
margin: 50px;
}
.loader {
position: relative;
border-radius: 50%;
box-sizing: border-box;
width: 80px;
height: 80px;
background: linear-gradient(to bottom, #fff 50%, #51cf66 50%);
}
.loader:before {
content: "";
position: absolute;
left: 10px;
right: 10px;
top: 10px;
bottom: 10px;
border-radius: 50%;
background: #fff;
}
.dot {
position: absolute;
width: 10px;
height: 10px;
border-radius: 50%;
background: #51cf66;
}
.dot:first-child {
left: 10px;
top: 10px;
}
.dot:last-child {
right: 10px;
top: 10px;
}
<div class="loader">
<div class="dot"></div>
<div class="dot"></div>
</div>
【问题讨论】:
标签: css css-animations css-shapes