Check out this code snippet:
.container {
width: 150px;
height: 100px;
}
.test {
color: white;
background-color: red;
width: 100%;
height: 25%;
transition: height ease 1s;
}
.test:hover {
height: 100%;
}
<div class="container">
<div class="test">Hover Here</div>
</div>
This code shows a simple div inside a container that expands to 100% when hovered over. I'm looking to do something similar in a navigation menu, like the one on .
My goal is to have the main div expand from 0% to 100% in height when a user hovers over the container div (not the main box itself).
I've tried using JQuery by adding a ".hovered" class, but haven't had any success. Does anyone know how to code this effect?
I would greatly appreciate any help. Thank you!