问题
Good morning,
I'm having trouble with a website I'm working on. I have a slider for my photos and drop down menu. It work fine on every other browser but in Safari my slider goes on top of the drop menu.
In Safari (Mac version),
In Other browsers,
I have added the z-index to my menu CSS as below (then it started working on other browsers)
#cssmenu {
font-family: Montserrat, sans-serif;
background: #333333;
/*Always on top of everything*/
z-index: 999;
}
回答1:
After doing a full browser cache clean, this CSS seems to have worked
#cssmenu {
font-family: Montserrat, sans-serif;
background: #333333;
z-index: 999;
position: relative;
}
回答2:
I had similar issue and while setting z-index on element (a thumbnail in my case) worked in all but Safari, I had to also set z-index on the containing div and now also works in safari.
来源:https://stackoverflow.com/questions/27071462/safari-ignores-z-index-value