Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
132 views
in Technique[技术] by (71.8m points)

javascript - Properties image div responsive

I have to modify this script so that the four images contained, keep the properties of height and width in case of responsive effect. At the moment they are being crushed. Clearly, also keeping the zoom effect inside the div. I've tried everything but I can't. Some idea?

I have really tried everything but I can't understand.

online link:

.module_a {
  background: 
    linear-gradient(
      rgba(0, 0, 0, 0.1),
      rgba(0, 0, 0, 0.1)
    ),
    url(https://www.woodyvalley.it/prova/img_home/test_1.jpg) ;
   background-size: 100% 100%;
   background-repeat: no-repeat;
  width: 100% ;
  height: 230px ;
  margin: 0px 0 0 0px ;
  float: left ;
  padding: 0px ;
  
}

.module_b {
  background: 
    linear-gradient(
      rgba(0, 0, 0, 0.1),
      rgba(0, 0, 0, 0.1)
    ),
    url(https://www.woodyvalley.it/prova/img_home/test_2.jpg) ;
   background-size: 100% 100%;
   background-repeat: no-repeat;
  width: 100% ;
  height: 230px ;
  margin: 0px 0 0 0px ;
  float: left ;
  padding: 0px ;

}

.module_c {
  background: 
    linear-gradient(
      rgba(0, 0, 0, 0.1),
      rgba(0, 0, 0, 0.1)
    ),
    url(https://www.woodyvalley.it/prova/img_home/test_3.jpg) ;
   background-size: 100% 100%;
   background-repeat: no-repeat;
  width: 100% ;
  height: 230px ;
  margin: 0px 0 0 0px ;
  float: left ;
  padding: 0px ;
}

.module_d {
  background: 
    linear-gradient(
      rgba(0, 0, 0, 0.1),
      rgba(0, 0, 0, 0.1)
    ),
    url(https://www.woodyvalley.it/prova/img_home/test_4.jpg) ;
   background-size: 100% 100%;
   background-repeat: no-repeat;
  width: 100% ;
  height: 230px ;
  margin: 0px 0 0 0px ;
  float: left ;
  padding: 0px ;
}

.cap p {
  font-size: 26px ;
  font-weight: 200 ;
  color: white;
  font-family: MorganSansLining;
  margin: 0 auto ;
  text-align: center ;
  bottom: 100px ;
  margin-top: 100px ;

}

.zoom   {
  -moz-transition: all 0.5s ;
  -webkit-transition: all 0.5s;
  transition: all 0.5s;
}

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


.playBtn {
   position: relative;
   background-image:url("https://www.woodyvalley.it/prova/images/pre_1.png");
   background-size: 60px 60px;
   height: 60px;
   width: 60px;
   top: -90px;
   left: 0px;
    z-index:999;
}

.playBtn:hover {
   position: relative;
   background-image:url("https://www.woodyvalley.it/prova/images/post_1.png");
   background-size: 60px 60px;
   height: 60px;
   width: 60px;
   top: -90px;
   left: 0px;
    z-index:999;
}

.container_img {
    float: left;
    overflow: hidden;
    width: 24.99999%;
}



.clearfix:after {
  content: "";
  display: table;
  clear: both;
}
<div class="container_img responsive">
<a href="vani-light-2.html"><div class="module_a cap zoom" >
  <p>TEXT FOR TEST 1</p>
</div></a>
</div>

<div class="container_img responsive">
<a href="gto-light-2.html"><div class="module_b cap zoom" >
  <p>TEXT FOR TEST 2</p>
</div></a>
</div>

<div class="container_img responsive">
<a href="vani-3.html"><div class="module_c cap zoom" >
  <p>TEXT FOR TEST 3</p>
</div></a>
</div>

<div class="container_img responsive">
<a target="_blank" href="https://youtu.be/ZJp9RcF5FmI"><div class="module_d cap zoom">
  <p>TEXT FOR TEST 4</p>
  <p class="playBtn"></p>
</div></a>
</div>

<br style="clear: both;">

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...