How do I make make sharp text appear over a blurred background on :hover?
Hi,
Basic CSS question here.
I like using<a> tags w/ image backgrounds as gallery thumbnails because of how easy it is to specify css :hover effects. However, I'm going for something a bit more complex than what I'm used to this time; and have a feeling the solution lies in css commands I'm less familiar with.
There are two things I would like to see happen on :hover
- The regular-state background image goes dark & blurs, via filter: brightness(25%) blur(2px)
- Text (sharp) appears over the (blurred) result.
As we know, the text will adopt whatever properties are applied on the container; but even if you wrap said text in <span> tags with filter:blur(0) !important applied, it won't override the parent's state (which is now dark & blurry, so the text is as well).
How do I go from a clear image (ideally, a BG on an <a> tag since it will be clickable) to something like the first few seconds of this video (minus the movement). The text should be centered on both axis, just like that (it will likely be just a word or two).
I'm not entirely sure what the proper way to do this is, but I'm assuming I would need 2 containers per thumbnail (one for the image, one for the text appearing on :hover). Could someone help me with the exact syntax?
PS: I assume there will be a "safe zone" on the :hover area where the text is, since it will be on top of the <a> tag when the page renders; if this is the only side effect, I can live with it. Although it would be even better if that safe zone didn't exist.
Thanks!
