我遇到问题,无法正确解决。有带有注册表格的标头,但我无法响应背景图片。我已经阅读了很多手册,但是没有用。
.background-img {
background-image:url('http://lorempixel.com/1920/655/');
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-repeat: no-repeat;
width: 100%;
height: auto;
}
<div class="landing background-img">
<div class="overlay">
<div class="container">
<div class="row">
<div class="col-md-7">
<!-- /.main title -->
<h1 class="wow fadeInLeft text-center">
Header phrase
</h1>
</div>
<!-- /.signup form -->
<div id="reg">
<div class="col-md-5 ">
<div class="signup-header wow fadeInUp">
<h2 class="form-title text-center" id="signup_title">Register</h2>
<form class="form-header" role="form" method="POST" id="#">
<div class="form-group" id="mask">
<input class="form-control input-lg" name="username" id="phone_reg" type="text" placeholder="Phone" required>
</div>
<div class="form-group">
<input class="form-control input-lg" name="password" id="password" type="password" placeholder="Pass" required>
</div>
<div class="form-group last" id="reg_block">
<input class="btn btn-warning btn-block btn-lg" id='popup_login_in_pass' onclick="getPassForPhone()" value="GetPass">
<input type="checkbox" id="is_send_sms" onclick="showIsSMSEnter(this)"> <span id="is_send_sms_label">SMS is here</span>
</div>
<div class="form-group last">
<input type="submit" class="btn btn-warning btn-block btn-lg" id='enter' value="Enter">
</div>
<p class="error_reg_result text-center">some text</p>
<small class="time_reg_result" style="display: none">SMS will come after <span class="time_reg_sms">60</span> sec.</small><br>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
如果我更改背景尺寸:达到背景大小:图像变得敏感,但是即使我将其设置为高度,它也会改变高度:100%;
我如何实现我的目标?