When hovering over a side-info-panel (.popup-hover-section
), I want the info-img to hide(.popup-hover-div p
), and at the same time show the text in .show-span
.
<section class="popup-hover-section">
<div class="popup-hover-div"><p></p><span class="show-span">Hidden text, but only until I am hovered over, and the whole section is shown! And my brother paragraph is hidden! :)</span></div>
</section>
.popup-hover-section {
height: 30%;
width: 65px;
position: absolute;
right: 0%;
top: 30%;
background-color: #111;
color: #eee;
border-radius: 40px 0 0 40px;
transition: width 1s;
transition-property: border-radius, width;
box-shadow: 7px 7px 3px 0px rgba(0,0,0,0.75);
z-index: 20;
}
.popup-hover-div p {
padding: 32px 32px 32px 32px;
display: flex;
align-self: center;
background: url(images/information.png) no-repeat;
background-size: 100%;
opacity: 0.5;
}
.show-span {
/*I want to show the text inside this one, and when I do, the p-img should not show anymore*/
}
.popup-hover-div p:hover {
opacity: 1;
}
.popup-hover-section:hover {
background-image: linear-gradient(147deg, #FFE53B 0%, #FF2525 74%);
transition-duration: 1.3s;
border-radius: 0 0 0 0;
transition-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1.28);
width: 400px;
}
```