I am developing a chrome extension, which, with any hover over the image, should put a window above the image, and the image should be enlarged up to 1.5 times compared to the original image. So I started working on examples and found a similar example.
.zoomin img { height: 200px; width: 200px; -webkit-transition: all 2s ease; -moz-transition: all 2s ease; -ms-transition: all 2s ease; transition: all 2s ease; } .zoomin img:hover { width: 300px; height: 300px; }
<div class="zoomin"> <img src="http://www.corelangs.com/css/box/img/zimage.png" title="All you need to know about CSS Transitions " /> </div>
But instead, I need to create a field without scaling the image on hover. So in my exercise using this Using only CSS, show the div on the hover above <a> , I designed this.
main.js div { display: none; } img:hover + div { display: block; height : 200px; width : 300px; }
But the problem is that the image size must be dynamically adjusted based on the image that we are aiming.
Is there a way to make this work, when we hang up an image, it should automatically make a div, which should contain 1.5 times the size of the image. All offers. Please, help
I have provided a screenshot below for reference.
source share