The following code renders a perfect rotating circle in safari, but not in 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>
http://jsfiddle.net/p4ban9cs/
It does not renders perfectly, the problem is visible when rotating a big circle, it's like a wiggling circle on chrome.
thank you for help.
Adding an outer element as a wrapper and apply same styling to it, to mask the inner circle rotation as seen in this Fiddle
<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%;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With