当我模拟我的网站的移动设置时,社交图标应该消失;但是,他们留下来。我曾尝试将col-xs-0
放入i帧本身,但没有任何结果。col-xs-0 Not Working Bootstrap
这里是我的页脚HTML。
<footer>
<div class="container-fluid">
<div class="row">
<div class="col-xs-0 col-md-2 pull-right footersocial">
<a href="#" target="_blank"><i class="fa fa-facebook-official fa-3x socialicons" aria-hidden="true"></i></a>
<a href="#" target="_blank"><i class="fa fa-twitter fa-3x socialicons" aria-hidden="true"></i></a>
<a href="#" target="_blank"><i class="fa fa-instagram fa-3x socialicons" aria-hidden="true"></i></a>
</div>
</div>
<div class="row" style="margin-left: 15px; margin-top: 15px;">
<div class="col-md-2 text-center">
<p>Privacy Policy</p>
</div>
<div class="col-md-2 text-center">
<p>Terms of Service</p>
</div>
<div class="col-md-2 text-center">
<p>Acceptable Use Policy</p>
</div>
<div class="col-md-2 text-center">
<p>Warranty & Returns Policy</p>
</div>
<div class="col-md-2 text-center">
<p>Third Party Copyright Notices</p>
</div>
<div class="col-md-2 text-center">
<p>Terms of Service for Phone</p>
</div>
</div>
</div>
</footer>
我的CSS:
.socialicons {
color: white;
margin-right: 10px;
margin-top: 10px;
margin: 0 auto;
display: block;
}
.footersocial {
margin: 0 auto;
display: block;
}
.col-xs-0 {
display: none;
}
'col-md-2'可能会用'display:block'覆盖你的自定义CSS代码。如果你在'bootstrap.css'之前加入了你的CSS代码,或者这可能是由于特殊原因,这可能会发生。有很多方法可以使您的自定义CSS代码更加具体,从而不会被覆盖。但更好的选择是使用'hidden-xs'作为Praveen的答案。 –