I have a very simple navigation bar - horizontal, with one level of vertical dropdowns - that I've implemented using CSS. I wanted to add a short delay when the mouse comes off the dropdowns. Looking around, it appeared that a CSS transition of the visibility property might get me close. Here is the pertinent CSS:
.navigation ul ul
{
display: block;
visibility: hidden;
-webkit-transition: visibility .75s, linear;
-moz-transition: visibility .75s, linear;
/* etc... */
transition: visibility .75s, linear;
}
.navigation ul li:hover > ul
{
visibility: visible;
}
This did exactly what I needed on OS X in Firefox (44.0.2), Chrome (48.0.2564.116), and even Opera (35.0.2066.68). In fact, I was surprised that there was no delay for mouseover but the delay was applied on mouseoff. Just what I wanted.
In Safari (9.0.3), it acts as if the transition property is not there - the dropdown immediately disappears on mouseoff. Looking at "Inspect Element", I can see that the browser has picked up the transition property (properly) for the ul tag in question.
Am I missing something and are the other browsers just being permissive? Is Safari not acting correctly? This isn't a huge issue but I'd like to get it to work everywhere if possible. Thanks!
NOTE/EDIT on possibility of duplicate question (CSS transition with visibility not working): In my case, the binary visibility effect is working as desired in all cases I've tried except for Safari. Also, I've figured it out, which I'll post below...