ens*_*xte 5 css google-chrome transform css3
以下代码在safari中呈现完美的旋转圆,但不在chrome中.
<style>
.circle{
height:1000px;
width:1000px;
background-color:#000;
border-radius: 50%;
}
@-webkit-keyframes rotating {
from{
-webkit-transform: rotate(0deg);
}
to{
-webkit-transform: rotate(360deg);
}
}
.rotating {
-webkit-animation: rotating 2s linear infinite;
-webkit-transform-origin: center;
}
</style>
<div class="circle rotating">
</div>
Run Code Online (Sandbox Code Playgroud)
它不能完美呈现,旋转大圆时问题是可见的,就像镀铬上的摆动圆圈一样.
谢谢你的帮助.
添加外部元素作为包装器并对其应用相同的样式,以掩盖内圆旋转,如本小提琴中所示
<div class="overlay">
<div class="circle rotating">Test</div>
</div>
.overlay{
height:1000px;
width:1000px;
box-shadow:0 0 0 10px #000 ;
background:black;
border-radius: 50%;
}
Run Code Online (Sandbox Code Playgroud)