1

I need to do in my web site collection of images and when hover opacity has to change with small icon for zoom

And when clicking on plus icon, I need to have image in big format

Please, Do you know how to change this code to have this result

this is my code for images side by side

<section class="py-5" style="padding:0px !important;">
      <div class="container-fluid " >    
        <div class="row " >
          <div class="col-md-4 col-sm-6" style="padding: 0px !important;width:50px;height: 350px">  
              <img class="img-fluid " src="img1.png" alt="" style="width:100%;height: 100%">
          </div>

          <div class="col-md-4 col-sm-6" style="padding: 0px !important;width:50px;height: 350px">      
              <img class="img-fluid  " src="img2.png" alt="" style="width:100%;height: 100%" >
          </div>

          <div class="col-md-4 col-sm-6" style="padding: 0px !important;width:50px;height: 350px">
              <img class="img-fluid " src="img3.png" alt="" style="width:100%;height: 100%"  >
          </div>

          <div class="col-md-4 col-sm-6" style="padding: 0px !important;width:50px;height: 350px">
              <img class="img-fluid " src="img4.png" alt="" style="width:100%;height: 100%">
          </div>

          <div class="col-md-4 col-sm-6" style="padding: 0px !important;width:50px;height: 350px">
              <img class="img-fluid " src="img5.png" alt="" style="width:100%;height: 100%">
          </div>
          <div class="col-md-4 col-sm-6" style="padding: 0px !important;width:50px;height: 350px">           
             <img class="img-fluid " src="img6.png" alt="" style="width:100%;height: 100%">
          </div>
        </div>
   
      </div>
    </section>
bochra bochra
  • 15
  • 1
  • 3
  • Does this answer your question? [How to zoom image on hover with CSS](https://stackoverflow.com/questions/54190149/how-to-zoom-image-on-hover-with-css) – Asaf Sep 17 '20 at 11:55

1 Answers1

0

Here i have some code this may help you, grow your image with pure CSS.

CSS


* {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.HoverDiv {
  position: relative;
  overflow: hidden;
  border:1px solid black;
  width:360px;
  margin: 10px;
}

.HoverDiv img {
  max-width: 100%;
  text-align:center;
  -moz-transition: all 0.3s;
  -webkit-transition: all 0.3s;
  transition: all 0.3s;
}

.HoverDiv:hover img {
  -moz-transform: scale(1.1);
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

img {
    display: inline-block;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    transition: 0.3s;
  position:relative;
  z-index:1;
}

img:hover {
    box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5);
   -webkit-transform: skewX(-20deg);
  -ms-transform: skewX(-20deg);
  transform: skewX(-20deg);
  -webkit-transform-origin:0 0;
  -ms-transform-origin:0 0;
  transform-origin:0 0;
}

HTML

<div class="HoverDiv">
<img src="http://pngimg.com/upload/tiger_PNG546.png" alt="Smiley face">
</div>
Prometheus
  • 16
  • 3