Currently, I am in the process of creating a dynamic language selection feature using HTML and CSS. Initially, this is what it looks like:
https://i.stack.imgur.com/bhnaA.png
Upon hovering over it, this is the effect I want to achieve:
https://i.stack.imgur.com/phoWN.png
This is the HTML code that I have used:
.wrapper {
margin: 20px;
background-color: lightgray;
border-radius: 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
width: 33px;
}
.icon {
padding: 5px 10px;
display: none;
}
.icon.active-icon {
display: inline-block;
}
.icon:hover {
cursor: pointer;
display: inline-block;
}
<div class="wrapper">
<img class="icon active-icon" src="./ua.svg" alt="" />
<img class="icon" src="./ru.svg" alt="" />
<img class="icon" src="./en.svg" alt="" />
</div>
However, I am facing an issue where the 'display' property does not change on hover, and the initially hidden elements do not appear as intended.