Here是我的小提琴链接。我用css创建了一个移动的微调器。但是旋转/移动的黑色部分应该具有圆形边缘。无法从我现在拥有的东西中获得它。
.loader {
position: relative;
border-top: 10px solid #805da4;
border-right: 10px solid #805da4;
border-bottom: 10px solid #805da4;
border-left: 10px solid #000;
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
-webkit-animation-name: spinner;
-webkit-animation-duration: 3s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-webkit-animation-delay: 0s;
display: block;
border-radius: 50%;
width: 100%;
height: 100%;
}
答案 0 :(得分:0)
<div class="highlightRoundBox">
<span class="loading">
<span class="edge edge-left"></span>
<span class="edge edge-right"></span>
</span>
</div>
CSS代码中的
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.highlightRoundBox {
position: relative;
margin: 11px 27px 13px 6px;
width:68px;
height: 68px;
}
.loading {
display:block;
position:relative;
border-radius: 50%;
width: 100%;
height: 100%;
border: 0.5rem solid #805da4;
border-top-color: #000;
animation: spin 1s infinite linear;
}
.loading .edge {
display:block;
position: absolute;
border-radius: 50%;
width: 0.5rem;
height: 0.5rem;
background:#000;
}
.loading .edge.edge-left
{
top:0.22rem;
left:0.2rem;
}
.loading .edge.edge-right
{
top:0.20em;
right:0.22em;
}