gpt4 book ai didi

html - text-center 和 text-right 在 bootstrap 中不起作用

转载 作者:太空狗 更新时间:2023-10-29 14:54:55 25 4
gpt4 key购买 nike

我希望页面上的一些元素居中和靠右对齐,但是 Bootstrap 类“text-right”和“text-center”似乎不起作用,尽管“text-left”可以。

谢谢。

<div class="container-fluid">
<div class="row text-center" id="header">
<div class="col-xs-12">
<div class="container" style="padding-left:30px; padding-right:30px;">
<div class="col-xs-2 text-left" id="mainLogo">
<a href="/"><img src="/stylesheet/main_logo.png" ></a>
</div>

<div class="col-xs-6 text-right">
<ul class="nav nav-pills">
<li role="presentation" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-expanded="false">
<span class="glyphicon glyphicon-user"></span> Account <span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li id="ctl00">
<a href="/account/">Your Account</a>
</li>
<li id="user">
<a href="/profile/">Profile</a>
</li>
<li id="panel">
<a href="/shop/reviewbasket/">Basket</a>
</li>
</ul>
</li>
</ul>
</div>

<div class="col-xs-4 text-right">
<div id="search">
</div>
</div>
</div>
</div>
</div>
</div>

最佳答案

对于使用 Bootstrap 5 的用户,请注意 text-lefttext-right 类已被删除。现在您可以使用 text-starttext-end

关于html - text-center 和 text-right 在 bootstrap 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38746394/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com