I am currently developing a Portal website for one of my classes, and the template provided by my professor utilizes the <picture>
tag to adjust images depending on the browser's size. My goal is to add a blur effect and darken the image while displaying text crediting the artist when hovering over it.
To see how the website looks, you can visit .
This is the HTML code I've implemented:
<picture class="profile">
<source media="(min-width: 1200px)" srcset="images/king.jpg" alt="My fantasy self-portrait.">
<source media="(min-width: 501px)" srcset="images/wisteria.jpg" alt="My personal game self-insert.">
<img src="images/everett.gif" alt="My sunshine who makes me very happy." />
</picture>
Here is my attempt at writing the CSS:
picture:hover > .overlay {
background-color:#000;
opacity:0.5;
filter: blur(8px);
-webkit-filter: blur(8px);
I'm considering placing the <picture>
within a <div>
element and then applying the CSS to that. Will this maintain the image responsiveness?