我正在制作一个 css3 加载器动画,但我无法让它变得非常清晰。因为我基本上使用了两个圆圈,所以由于两个重叠的圆圈,边缘有一个轻微的凸起。
关于如何解决这个问题的任何想法?
http://codepen.io/anon/pen/qdylp
<div class="loader loader-2"></div>
<style type="text/css">
body {
max-width: 1000px;
margin: 100px auto 0;
padding-left: 6.25%;
}
.loader {
position: relative;
display: inline-block;
margin: 0 12.5% 100px;
width: 58px;
height: 58px;
border: 2px solid #0cf;
border-radius:50%;
box-sizing: border-box;
animation: spin 4.5s infinite linear;
}
.loader::before,
.loader::after {
left: -2px;
top: -2px;
display: none;
position: absolute;
content: '';
width: inherit;
height: inherit;
border: inherit;
border-radius: inherit;
box-sizing: border-box;
}
/*
* LOADER 2
*/
.loader-2 {
border-top-color: transparent;
background-clip: content-box;
background-clip: border-box;
}
.loader-2::after {
display: block;
left: -2px;
top: -2px;
border: inherit;
transform: rotate(300deg);
background-clip: content-box;
background-clip: border-box;
border-top: 2px solid transparent;
border-left: 2px solid transparent;
border-bottom: 2px solid transparent;
}
.stopped {
animation: spin 1004.5s infinite linear;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
</style>