Html 使用引导列中的引导页面布局问题
我使用引导列来设置页面样式。我的Html 使用引导列中的引导页面布局问题,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我使用引导列来设置页面样式。我的行中有4个主div,我希望它们显示在一行中,但它们不是,并且在页面底部插入了一个滚动条。有什么问题?我的代码和JSFIDLE如下所示 HTML: 这里是我的只是一个提示:直接嵌套列(就像您使用.col-md-9>.col-md-3所做的那样)可以在引导中做一些奇怪的事情。尝试交替列和行()@wiludaman我之前已经测试过了,并删除了divclass=“col-md-9”,但没有区别!您在项目中使用哪个引导版本?为什么使用display:flex?只需删除它,在
行中有4个主div
,我希望它们显示在一行中,但它们不是,并且在页面底部插入了一个滚动条。有什么问题?我的代码和JSFIDLE如下所示
HTML:
这里是我的只是一个提示:直接嵌套列(就像您使用
.col-md-9>.col-md-3
所做的那样)可以在引导中做一些奇怪的事情。尝试交替列和行()@wiludaman我之前已经测试过了,并删除了divclass=“col-md-9”
,但没有区别!您在项目中使用哪个引导版本?为什么使用display:flex?只需删除它,在body标记后使用container,这将解决您的滚动问题,最后从col make offset 0中删除offset类,直到您想要的断点,这样您就可以得到您想要的结果。下面是简单的演示@AwesomeDesigner引导程序3.3.7
<div id="pre-footer" class="row">
<div class="col-md-9">
<div class="adv-clickable col-md-3 col-sm-6 col-xs-10 col-xs-offset-1">
<a href="#"><p>fdhgf</p></a>
<a href="#"><p>fdgdfg</p></a>
<a href="#"><p>fgdfg</p></a>
<a href="#"><p>fgdfg fgdfg</p></a>
<a href="#"><p>fgdfg gfddg</p></a>
<a href="#"><p>dgdfgfd</p></a>
<a href="#"><p>fgdfgdf fgdff gdfgdfg dgdfg</p></a>
</div>
<div class="adv-clickable col-md-3 col-sm-6 col-xs-10 col-xs-offset-1">
<a href="#"><p>fdhgf</p></a>
<a href="#"><p>fdgdfg</p></a>
<a href="#"><p>fgdfg</p></a>
<a href="#"><p>fgdfg fgdfg</p></a>
<a href="#"><p>fgdfg gfddg</p></a>
<a href="#"><p>dgdfgfd</p></a>
<a href="#"><p>fgdfgdf fgdff gdfgdfg dgdfg</p></a>
</div>
<div id="pre-footer-nested1" class="col-md-3 col-sm-6 col-xs-10 col-xs-offset-1">
<img src="images/pre-footer-logo.png">
<div id="socials" class="col-xs-9 center-block">
<a href="#"><i class="fa fa-3x fa-facebook-square"></i></a>
<a href="#"><i class="fa fa-3x fa-twitter-square"></i></a>
<a href="#"><i class="fa fa-3x fa-linkedin-square"></i></a>
<a href="#"><i class="fa fa-3x fa-instagram"></i></a>
<a href="#"><i class="fa fa-3x fa-telegram"></i></a>
</div>
<form action="#" class="form-group col-xs-9 center-block">
<label for="email" class="text-center">ghdfgfdghfghfghfg</label>
<input type="email" id="email" class="form-control" placeholder="fdgdfgfdhggfh" >
<input type="submit" value="dfghfdghgfhg" class="btn btn-block btn-success">
</form>
</div>
<div id="pre-footer-nested2" class="col-md-3 col-sm-6 col-xs-10 col-xs-offset-1">
<img src="images/nemad.jpg" >
<div class="col-md-12">
<div class="footer-logos">
</div>
<div class="footer-logos">
</div>
<div class="footer-logos">
</div>
<div class="footer-logos">
</div>
</div>
</div>
</div>
</div>
#pre-footer{
display: flex;
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
margin-top: 50px;
position: relative;
}
.adv-clickable{
display: flex;
justify-content: space-around;
flex-direction: column;
align-items: center;
}
.adv-clickable a:first-child p{
margin-bottom: 30px;
}
.adv-clickable p{
color: #606060;
font-size: 12px;
font-weight: bold;
}
.adv-clickable a{
text-decoration: none;
}
#pre-footer-nested1{
display: flex;
flex-direction: column;
justify-content: center;
}
#pre-footer-nested1 img{
width: 40px;
height: 40px;
margin: 0 auto;
}
#pre-footer-nested2{
display: flex;
flex-direction: column;
justify-content: center;
}
#socials{
margin-top: 20px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
#socials i{
color: #01a89e;
}
#pre-footer-nested1 form{
margin-top: 20px;
display: flex;
flex-direction: column;
}
#pre-footer-nested1 form label{
font-size: 10px;
font-weight: bold;
margin-bottom: 10px;
}
#pre-footer-nested1 input:last-child{
margin-top: 10px;
background-color: #01a89e;
font-size: 12px;
}
#pre-footer-nested1 input:last-child:active{
background-color: #0f8079;
}
#pre-footer-nested2{
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
flex-wrap: wrap;
}
#pre-footer-nested2 img{
width: 100px;
height: 120px;
}
#pre-footer-nested2 div{
display: flex;
margin-top: 22px;
justify-content: center;
flex-wrap: wrap;
}