keyframe animation does not work on safari for iOS
I arrived here with the same problem, then tried something which worked :
Try renaming each of your keyframes (and animations) to something unique for every browser prefix.
eg:
#rotatingDiv {
position: relative;
z-index: 0;
display: block;
margin: auto;
height: 30px;
width: 30px;
/* renamed these */
-webkit-animation: webkit-rotation .7s infinite linear;
-moz-animation: moz-rotation .7s infinite linear;
-o-animation: o-rotation .7s infinite linear;
animation: rotation .7s infinite linear;
border-left: 8px solid rgba(0, 0, 0, .20);
border-right: 8px solid rgba(0, 0, 0, .20);
border-bottom: 8px solid rgba(0, 0, 0, .20);
border-top: 8px solid rgba(33, 128, 192, 1);
border-radius: 100%;
}
@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(359deg);
}
}
/* and renamed these accordingly */
@-webkit-keyframes webkit-rotation {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(359deg);
}
}
@-moz-keyframes moz-rotation {
from {
-moz-transform: rotate(0deg);
}
to {
-moz-transform: rotate(359deg);
}
}
@-o-keyframes o-rotation {
from {
-o-transform: rotate(0deg);
}
to {
-o-transform: rotate(359deg);
}
}
@-webkit-keyframe animation content isn't working in Safari and iOS
According to this thread : css animation on "content:" doesn't work on Safari and Firefox
It is not possible to animate the content property of a pseudo element except in Chrome on desktop. So you cannot achieve this threw css for IOS
You have to use Javascript
I would use a loop with an if statement checking the current inner.html value to change the value text after a certain time (setTimeOut or setInterval)
CSS Animation Keyframes not working on Iphone/Ipad
The content
property is no animatable according to the CSS spec. Here is a list of properties that can be animated. Chrome does support it nonetheless since 2020. (See also this CSS-Tricks article on the issue)
To make this work across all browsers you could use JavaScript or make a different element for each content
value and animate their display or opacity values individually.
CSS Animation Behaving Differently on Safari / All iPhone Browsers
What ultimately worked for me was combining the four animations into one, like this:
@keyframes launch {
30% {transform: translateX(1050px) rotate(0);}
50% {transform: translateX(1050px) scale(1) rotate(-82deg); top: 100px;}
80% {transform: translateX(1050px) scale(0.5) rotate(-82deg);}
100% {transform: translateX(1050px) scale(0.5) rotate(-82deg); top: 270px;}
}
Seems like Safari had a problem trying to run multiple keyframes animations at once.
Related Topics
How to Get CSS Variables Working in Chrome 34
Prefer Shrinking Over Growing in a Flex Container with Flex-Flow: Row Wrap
CSS Display:None and Visibility:Hidden
Cannot Change the Content of Visited :Before Pseudo-Elements
Pure CSS: Center Tooltip Above Text on Hover Pt. 2
Nightwatch Cannot Find/Click on Dropdown Option
A:Visited Links - Opacity Not Working
Css: Skew a Buttons Border, Not the Text
How to Maintain a Circlur Shape of Element with Dynamic Content
CSS Is Not Loaded at All in Internet Explorer (Sec7113)
Ie Z-Index Trouble on Element with Transparent Background
Sass: Set Variable at Compile Time
Special Characters in CSS Selectors
Article Push/Pull Alignment Using Bootstrap 3