【发布时间】:2016-08-11 00:15:49
【问题描述】:
我没有要展示的代码,但我正在尝试将 img 或背景图像完全安装在容器内,并在屏幕调整大小时调整大小。 有人可以帮忙吗?
编辑:我特别希望背景保持适合 div
<!-- Intro Section -->
<section class="success" id="about">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2>intro</h2>
<!--<hr class="star-light"> -->
<br>
<p>
text
</p>
<p>
text
</p>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-lg-offset-2">
</div>
<div class="col-lg-4">
</div>
<div class="col-lg-8 col-lg-offset-2 text-center">
<a href="#" class="btn btn-lg btn-outline">
<i class="fa fa-download"></i> download
</a>
</div>
</div>
</div>
</section>
<!-- End of intro section -->
#about{
}
【问题讨论】:
-
CSS:
background-size:cover -
使用
background-size:contain见我的回答如下 ;)