I have a piece of html which looks like this
<div>
<i onclick="delete()" class="fa fa-times" aria-hidden="true"></i>
<object style="height:100%; width:100%;" data="https://example.com/static/img/4510119851.svg" type="image/svg+xml"></object>
</div>
Here I have an svg image which I show in object
tag and a cross
icon. Now I want the icon to only show up when I hover on the image.
I tried changing the css
like this
object i {
display: none;
}
object:hover i {
display: block;
}
But it doesn't work. What am I doing wrong?