【发布时间】:2016-09-20 19:43:33
【问题描述】:
我有一个 boostrap 网站,这是我网站上的顶部横幅。基本上有一个在屏幕上 100% 的背景图像。我在左侧有文字和一个按钮。 - 在桌面上看起来不错,但是当我下到平板电脑时,文字会出现在图像右侧的人脸上 - 在手机上它不显示人脸
背景图片没有缩放。我如何让它做到这一点?
平板截图:http://www.onvia.com/sites/default/files/tabelts-banner.jpg
手机截图:http://www.onvia.com/sites/default/files/mobile-banner.jpg
引导: http://www.bootply.com/JeOg9KYYnY
HTML:
<div class="intro-header">
<div class="container">
<div class="row">
<div class="col-lg-7">
<div class="intro-message">
<h1>Adobe Exchange</h1><br>
<p class="subtitle">Search the most comprehensive online library of video tutorials, code samples to help you quickly learn how to create the web.</p>
<p class="intro-divider"></p>
<a href="#register" class="btn btn-primary btn-lg"><span>Register for a Free Account</span></a>
</div>
</div>
</div>
</div>
<!-- /.container -->
</div>
<!-- /.intro-header -->
CSS:
.intro-header {
padding-top: 50px; /* If you're making other pages, make sure there is 50px of padding to make sure the navbar doesn't overlap content! */
padding-bottom: 50px;
text-align: left;
color: #f8f8f8;
background: url(http://www.onvia.com/sites/default/files/example-bg.jpg) no-repeat center center;
background-size: cover;
}
【问题讨论】:
标签: html css twitter-bootstrap