After creating a CSS3 animation to fade out an element by adjusting its opacity from 1 to 0 and changing the position to absolute and display to none in the last frames, I encountered an issue. In Safari, only the opacity is maintained while the position and display properties do not set to the final values as intended.
@-webkit-keyframes impressum-fade-out {
0% {
opacity: 1;
display: block;
position: relative;
}
99% {
opacity: 0;
position: relative;
}
100% {
opacity: 0;
display: none;
position: absolute;
}
}
The issue seems to be specific to Safari (version 8 was tested), as it works fine on Chrome. It appears that position and display are not functioning properly with animation-fill-mode: forwards...
Check out the JSFiddle demonstration here: http://jsfiddle.net/uhtL12gv/
EDIT For Bounty: While I am aware of workarounds using Javascript and transitionend events, my curiosity lies in understanding why browsers lack support for this behavior. Is it stated in the specification that fillmode forwards does not apply to certain attributes like position, or could this be a bug within the browsers? I have been unable to find relevant information in the bug trackers. Any insights on this matter would be greatly appreciated.