Reputation: 2067
Is this possible? I've got
<div class="one">
<a><img src="http://lorempixel.com/100/100"></a>
</div>
I want it so on hover of the div (or <a>
) the new hover:background color/image covers the <img>
, kind of like the z-index of the hover changes.
So in this fiddle on hover of the <div>
or <a>
the 100px img wouldn't be visible, everything would be gold.
I'd like to keep the inline <img>
element.
Upvotes: 2
Views: 3943
Reputation: 207900
A background image can't be on top of an image in the same element, but you can simulate what you want by adding:
.one:hover img {
display:none;
}
Upvotes: 4