【发布时间】:2016-08-29 18:29:56
【问题描述】:
I want to make this responsive **我用 html 和 css 设计了这个,我想让这个 div 响应...我该怎么做?
我尝试使用引导列,但它不起作用
如果背景图像的高度固定,请告诉我如何使背景响应。
.im1
{
/*padding: 10px;*/
/*margin-left: 60px;*/
margin-top: 10px;
z-index: 1;
width: 250px;
height: 250px;
margin-right: -80px;
}
.background1 {
background: url("../car/car_web.jpg");
/*border: 2px solid black;*/
width:1380px;
height:350px;
background-repeat: no-repeat;
padding: 50px;
padding-top: 10px;
padding-left: 130px;
left: 0px;
/*position: absolute;*/
/*top: 20px;*/
margin-left: -155px;
}
<section id="COMPARE" style="margin-left: 100px;">
<div class="container">
<div class="col-md-12 background1">
<label class="ll">
<center><small><strong>Car Comparison lorims info</strong></small>
<h3>Compare Cars</h3>
</center>
</label><br>
<div class="im1 col-md-3" style="position:relative; margin-left:40px;">
<img class="" src="car/1.jpg" width="200px;" height="120px;" style=" position:absolute; z-index=1; top:0px; left:80px;">
<img src="icon/vs.png" width="55px" height="55px" style="position:absolute; top:30px; left:260px; z-index:3;">
<img class="" src="car/2.jpg" width="200px;" height="120px;" style=" position:absolute; z-index=1; top:0px; left:300px;">
<img src="icon/vs.png" width="55px" height="55px" style="position:absolute; top:30px; left:480px; z-index:3;">
<img class="" src="car/3.jpg" width="200px;" height="120px;" style=" position:absolute; z-index=1; top:0px; left:520px;">
<img src="icon/vs.png" width="55px" height="55px" style="position:absolute; top:30px; left:700px; z-index:3;">
<img class="" src="car/4.jpg" width="200px;" height="120px;" style=" position:absolute; z-index=1; top:0px; left:740px;">
</div>
<div class="col-md-12 de" id="compare">
<button type="submit" class="btn btn-primary12 btn-lg outline1 " name="login">COMPARE CARS</button></span>
<br>
<br>
<small><strong>Or <a href="#">Click here for custom comparison</a></strong></small>
</div>
</div>
</div>
</section>
【问题讨论】:
-
分享你的代码??
-
请包含您当前拥有的代码
-
你应该看看这个 - stackoverflow.com/help/asking
-
要么以百分比形式制作 div 的 css,要么了解 @media queries
-
复制代码,粘贴到...
标签: html css responsive-design