如何使div容器像列一样宽

时间:2017-04-28 09:51:54

标签: jquery html css

我有一个我开发的网页,在这个页面中我使用了列并放置了带有文本和按钮的图像。

enter image description here

我的问题是这个放置在列中的图片的div不符合列的大小,请查看此链接:http://andymurphy.tv/index.php/landing/

这是我目前在每一栏中实施的内容。



.container {
  position: relative;
  width: 100%;
  background-color: #4CAF50;
}

.image {
  opacity: 1;
  display: block;
  width: 100%;
  height: 406px;
  transition: .5s ease;
  backface-visibility: hidden;
}

.middle {
  transition: .5s ease;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%)
}

.container:hover.image {
  opacity: 0.3;
}

.container.image {
  opacity: 0.9;
}

.container:hover .middle {
  opacity: 1;
}

.container .middle {
  opacity: 3;
}

.text {
  background-color: #4CAF50;
  color: white;
  font-size: 16px;
  padding: 16px 32px;
}

<div align="left">
  <div class="container">
    <div class="tve_image_caption thrv_wrapper" style="margin: 0px -8px 0px 0px !important;"><span class="tve_image_frame"><img src="http://andymurphy.tv/wp-content/uploads/2017/04/Image-a.jpg" alt="Avatar" class="image" style="width:100%" width="669" height="499"></span></div>
    <div class="middle">
      <div align="center"><span style="color : #fff;font-size : 26px">Watch</span><br><br><span style="color : #fff;FONT-WEIGHT : BOLD;font-size : 30px">THE STORY</span></div><br>
      <div align="center"> <button class="button1">Play</button></div>
    </div>
  </div>
</div>
&#13;
&#13;
&#13;

请问我怎样才能获得我的div wif图像以填充列大小

0 个答案:

没有答案
相关问题