使用 Twitter Bootstrap,当我将浏览器的大小减小到 XS 大小时。这是我的页脚。我有 text-right 属性来处理其余的屏幕尺寸,但在 XS 上,它仍然在堆叠后将其右对齐。
如何使它在 XS 屏幕尺寸上不text-right?
<footer>
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12 copyright">
<p>© 2014 LFDate. All rights reserved.</p>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<ul class="list-inline text-right">
<li><p><a href="#">Blog</a></p></li>
<li><p><a href="#">Press</a></p></li>
<li><p><a href="#">Jobs</a></p></li>
<li><p><a href="#">Contact</a></p></li>
</ul>
</div>
</div>
</div>
</footer>
最佳答案
Bootstrap 4 has added new css classes for this purpose :
<p class="text-sm-right">Right aligned text on viewports sized SM (small) or wider.</p>
<p class="text-md-right">Right aligned text on viewports sized MD (medium) or wider.</p>
<p class="text-lg-right">Right aligned text on viewports sized LG (large) or wider.</p>
<p class="text-xl-right">Right aligned text on viewports sized XL (extra-large) or wider.</p>
关于html - Bootstrap : how to not have text-right in certain size?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25536497/