0
我有一个问题,我的jumbotron包含一些文本和一个按钮。基本上在一个小屏幕上(320),其中包含的文本不会以中间显示为中心,白色侧边栏出现在右侧,我无法弄清楚来自哪里。您可以在240和320的屏幕看到它在这里:http://mattkersley.com/responsive/该网站是http://test.assatena.it/在小屏幕上引导jumbotron宽度问题
HTML
<div class="jumbotron vertical-center container-fluid center-block">
<div class="container center-block">
<h1 class="center-block">Associazione Culturale e Musicale Atena</h1>
<div class="text-center center-block"><a data-toggle="modal" href="#modal-iscrizione" class="page-scroll btn btn-success btn-xl">iscriviti qui!</a></div>
</div>
</div>
CSS
.jumbotron{
position: relative;
background-image: url(http://www.assatena.it/wp-content/uploads/2014/06/sfondo1.png);
background-size: cover;
height: 100%;
width: 100%;
text-align: center;
margin: 0 auto;
overflow: hidden;
}
谢谢
你可以提供一个小提琴或摘录? – Swellar
你得到的额外空间不是因为你的Jumbotron,而是因为没有“最大宽度:100%”的img元素。谈论你的“新闻”部分。还可以降低小屏幕的字体大小。这将解决您关于文本居中的问题。 – divy3993
尝试使用媒体查询更改该屏幕宽度的字体大小。 – 2017-03-03 06:18:04