When I hover over the experience item, the texts appear instantly, and then the height increases gradually over one second. Why is this happening? I want my text to increase in height in sync with the height increase, without any delay. What can I do about this
.experience-item {
height: 285px;
overflow: hidden;
border-radius: 5px;
transition: 1s ease-out;
position: relative;
}
.experience-item .experi-details {
padding: 20px;
}
.experience-item:hover {
overflow: visible;
height: 500px;
box-shadow: 0 0 100px 0 rgba(0, 0, 0, 0.2);
}
<div class="experience-item">
<img src="../images/catering.jpg" alt="">
<h3>Bondhu Ekota Caters</h3>
<div class="experi-details">
<p><span>Position:</span> Food Distributor</p>
</div>
</div>
2
Answers
Change
transition: height 1s ease-out;
totransition: all 1s ease-out;
, otherwise only the height is transitioned, everything else appears instantly.Here is the solution to this:-
By adding this updated CSS code, both the height and overflow properties will transition over 1s.