With some minor changes to the transition property, this may work on iOS. On :hover limit transition only the opacity property, for example:
a:hover span { opacity:1; -webkit-transition: opacity 0.5s; transition: opacity 0.5s; visibility:visible; }โ
While visibility is an animated property , it seems to be a bug in the implementation of iOS. When you try to transition visibility , it seems that the whole transition is not happening. If you just limit your transition to opacity , everything works as expected.
To be clear: Leave the visibility property in your CSS, just don't try to translate it if you want everything to work in Mobile Safari.
For reference, here is your updated fiddle that I tested on the iPad:
a { background: gray; display: block; margin: 100px; padding: 100px; } a span { opacity: 0; -webkit-transition: 0.5s; visibility: hidden; } a:hover span { opacity: 1; -webkit-transition: opacity 0.5s; visibility: visible; }
<a href="#">a <span>span</span></a>
Michael Martin-Smucker
source share