5
I am trying to bring up a zoom icon on top of an image while passing the mouse over it (The screen has several images, the icon should appear only in the image that the user passed the mouse)
I tried something like:
.edit_hover_class{
width:100px;
height:100px;
background-image: url("https://images.pexels.com/photos/259803/pexels-photo-259803.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500");
background-size: cover;
}
.edit_hover_class i{
display:none;
}
.edit_hover_class:hover i {
display:block;
position: absolute;
top: 0; bottom: 0;
left: 0; right: 0;
margin: auto;
z-index: 999;
}
<link href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" rel="stylesheet"/>
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Material Design Bootstrap -->
<link href="css/mdb.min.css" rel="stylesheet">
<!-- Your custom styles (optional) -->
<link href="css/style.css" rel="stylesheet">
<div class="edit_hover_class">
<img class="miniaturaImg" src="./produtos/tv01.jpg">
<a href='#'><i class="fas fa-search-plus"></i></a>
</div>
<div class="edit_hover_class">
<img class="miniaturaImg" src="./produtos/tv01.jpg">
<a href='#'><i class="fas fa-search-plus"></i></a>
</div>
<div class="edit_hover_class">
<img class="miniaturaImg" src="./produtos/tv01.jpg">
<a href='#'><i class="fas fa-search-plus"></i></a>
</div>
There would be no better image for that answer! Very good.
– Bulfaitelo
@Bulfaitelo this CDN of images is the best, only it is random, every hour appears a different figure, even leaving the same size, has hours that it carries a different image... But Mr. Cage is the best! If you’re interested, there’s Fillmurray.com who’s really nice, too
– hugocsl