I've noticed a weird issue with my stacking order when applying a webkit filter. Why, when I hover over the image does the stacking order change?
I'd rather not have to use z-indexing to fix this, as it breaks other site elements.
Here's my JSFiddle
http://jsfiddle.net/r13ycy1p/
Please excuse Homer, I just needed an image.
EDIT: How can I reverse the effects to stop the absolutely position div from being hidden?
Here's my HTML
<ul>
<li>
<a href="#">
<div class="slide-content">
<div class="slide-title">
<h1>hello world</h1>
</div>
<div class="slide-desc">
<p>a description about something</p>
</div>
</div>
<img src="http://img4.wikia.nocookie.net/__cb20130920142351/simpsons/images/e/e9/Pic_1187696292_8.jpg"/>
</a>
</li>
</ul>
The CSS
li {
list-style:none;
}
.slide-content {
position:absolute;
color:red;
top:50px;
}
li a:hover img{
-webkit-filter: grayscale(100%); /* For Webkit browsers */
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…