I am using CSS animation to show different images based on the background color but the image position should not be changed and the background color animation should happen from bottom to top has the background color fill I should able to see the respective image for that particular background color on hover.
HTML
div class="card">
<div class="card-img">
<div>
<img src="../../images/assets/kidney_empty.svg" alt="">
</div>
<div>
<img src="../../images/assets/kidneys_rev.svg" alt="">
</div>
</div>
<div class="card-body">
<div class="content-selector-wrapper">
<paragraph>
<p><strong>Renal manifestations</strong> can progress to kidney failure.</p>
</paragraph>
</div>
</div>
</div>
CSS
.mult-image-animation {
text-align : center;
}
.mult-image-animation .card-img {
width : 150px;
height : 150px;
border-radius : 50%;
overflow : hidden;
margin-bottom : 35px;
position : relative;
margin-left : auto;
margin-right : auto;
}
.mult-image-animation .card-img > div {
position : absolute;
width : 150px;
height : 150px;
margin-left : auto;
margin-right : auto;
padding : 40px 30px;
max-width : 100%;
top : 0;
bottom : 0;
right : 0;
left : 0;
margin : auto;
height : 150px;
-webkit-transition : all ease 3s;
-moz-transition : all ease 3s;
transition : all ease 3s;
}
.mult-image-animation .card-img div:first-child {
z-index : 1;
}
.mult-image-animation .card-body {
padding : 0;
font-size : 18px;
color : #4D4D4F;
font-family : "Merriweather", Helvetica, Arial, sans-serif;
}
.mult-image-animation .card-body strong {
font-family : "Merriweather-Bold", Helvetica, Arial, sans-serif;
}
.mult-image-animation.trigger-animation .card-img div:last-child {
box-shadow : inset 0 -70px 0 0 #EA1010;
z-index : 5;
}
I am able to get the animation and the background image but has I hover it's hiding the previous image but I want the previous image to hide as the transition completes. Where i should be able to see both outline and solid image like this
JS Fiddle Image https://jsfiddle.net/prasadau1989/m9abLo4f/ Is there a way for me to achieve this in SVG? https://jsfiddle.net/prasadau1989/m9abLo4f/1/
Any guide is highly appreciated.
