背景色Css

背景色Css,css,Css,我正在使用Bootstrap3.0,下面是我的HTML代码,我面临着背景颜色的问题 HTML代码 <div class="container" id="pictures"> <div class="row"> <div class="col-md-12"> <h1>Collection</h1> </div> </div> </div&

我正在使用Bootstrap3.0,下面是我的HTML代码,我面临着背景颜色的问题

HTML代码

<div class="container" id="pictures">
    <div class="row">
        <div class="col-md-12">
            <h1>Collection</h1>
        </div>
    </div>
</div>

问题是,当我水平缩小浏览器的尺寸时,背景色消失了。谁能告诉我为什么

问题来自您申请的以下样式
h1

 margin: 60px 370px;
这意味着它需要最小(370+370)宽度来显示您的h1标签。将边距减少到较小的数字,这样您也可以在小屏幕上看到它

#pictures h1 {
padding:10px 0;
color: #fff;
font-size:60px;
background-color: #f92735;
text-align: center;
margin: 60px 30px;
border-radius: 10px;
margin-top: -65px;
}

图片元素在哪里?Collection@panther i在bootstrap 3.0中对此进行了编码。您提供的html是容器
#图片
?可能会被某些媒体查询覆盖?请尝试背景颜色:#颜色!重要的;没错,苏雷什!这就是问题所在。谢谢,好了,苏雷什。勾选它
#pictures h1 {
padding:10px 0;
color: #fff;
font-size:60px;
background-color: #f92735;
text-align: center;
margin: 60px 30px;
border-radius: 10px;
margin-top: -65px;
}