Twitter bootstrap 3 引导程序Jumbotron未调整到顶部
我的jumbotron没有按预期工作。这是我的代码:Twitter bootstrap 3 引导程序Jumbotron未调整到顶部,twitter-bootstrap-3,Twitter Bootstrap 3,我的jumbotron没有按预期工作。这是我的代码: <div class="jumbotron fill-jumbotron"> <div class="container" id="outer"> <h1 align="center" id="mapsHead">Google Maps Filter</h1> <div id="map"></div>
<div class="jumbotron fill-jumbotron">
<div class="container" id="outer">
<h1 align="center" id="mapsHead">Google Maps Filter</h1>
<div id="map"></div>
</div>
</div>
我已经试过强制body为100%,margins为0,padding为0!重要的。Div#map包含从api加载的google地图。根据此引导程序,我的jumbotron应该正常工作,但它不是:
我的视口初始比例设置为1,我尝试从不同的浏览器加载我的网页。Chrome developer显示,在jumbotron顶部,jumbotron(主体)外有一个空白区域
编辑:
通过更新引导库解决了这个问题。尝试将CSS中的
top
设置为0
,div应该附着在顶部。尝试将CSS中的top
设置为0
div应该附着在顶部。你能展示一下它与引导相反的外观吗?你的意思是模拟吗错误?是的,这就是我的意思,我必须强制css中的边距:top来模拟错误。你能展示一下它与引导层的对比吗?你的意思是模拟错误吗?是的,这就是我的意思,我不得不在css中强制使用margin:top来模拟错误。我强制它显示错误,我在真正的css中没有这种margin-top。更新的答案你为jumbotron发布的HTML代码是目前为止你在页面上唯一的东西?我强制它显示错误,在我真正的css中,我没有那个页边空白。到目前为止,页面上只有你为jumbotron发布的HTML代码吗?
.fill-jumbotron{
height:100%;
background: url('../assets/images/city2.jpg') no-repeat center center;
}