This is my first time posting sorry in advance, this is my first time trying to make a website for uni. Im trying to make 2 things happen to my image on hover, I want it to:
- blur
- make text appear
Ive managed to make it blur but cant seem to make any text appear on top of the blur.
CSS:
'''.container {
display: flex;
flex-wrap: nowrap;
width: 100vw;
height: 100vh;
justify-content: space-evenly;
}
.fern {
max-width: 50vw;
max-height: 100vh;
}
img {
max-width:100%;
max-height: 80vh;
}
.venus {
max-width: 50vw;
}
.venus:hover {
-webkit-filter:blur(10px);
transition: .5s ease;
cursor: pointer;
}
.fern:hover {
-webkit-filter:blur(10px);
transition: .5s ease;
cursor: pointer;
}
'''
HTML:
<body>
<h1 class="guide">
a guide to wellness and growth
</h1>
<div class="container">
<div class="fern">
<img src="./assets/images/fern_nobg.png" alt="fern_nobg">
</div>
<div class="venus">
<img src="./assets/images/venus_nobg.png" alt="venus_nobg">
</div>
</div>
</div>
</body>
I have tried this https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_display_element_hover and https://www.youtube.com/watch?v=W0ubfqwd4G4 and neither of them worked.