我正在创建一个带有背景图片的容器。在桌面或更大尺寸上没有问题。但是当窗口大小调整时,文本会出现在图像的顶部,并且文本变得不可读。您有关于此的解决方案吗?也许可以在较小的尺寸下更改图像的不透明度或完全删除背景图像并使用img src代替?这里是一个fiddle
<div class=" network container-fluid">
<div class="row">
<div class="container">
<div class="col-md-6"></div>
<div class="col-md-6">
<h1> Lorem Ipsume</h1>
<br>
<br>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting</p>
</div>
<br>
</div>
</div>
.network {
background: url(http://i.imgur.com/w5BnMSf.png), #f6f8f8;
background-repeat: no-repeat;
height: 50%;
background-attachment: fixed;
background-size: contain;
width: 100%;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}
.network h1 {
font-family:'Open Sans', arial, sans-serif;
font-weight: 300;
font-size: 49.4000015258789px;
color: dimgray;
padding-top: 40px;
}
.network p {
font-family:'Open Sans', arial, sans-serif;
font-weight: 300;
font-size: 19.4000015258789px;
color: dimgray;
text-align: justify;
}