gpt4 book ai didi

html - 对齐复杂的 Bootstrap 按钮布局

转载 作者:太空宇宙 更新时间:2023-11-04 03:11:45 25 4
gpt4 key购买 nike

我得到了这个(不太)复杂的 Bootstrap 按钮布局,我想将其正确对齐。这是它现在的样子:

enter image description here

我希望第二行(预定时间)右对齐。到目前为止,我已经尝试了所有 span 标签上 pull-right 和 text-right 类的所有组合都无济于事......

谁有办法解决这个问题?谢谢!

按钮代码:

<button type="button" class="btn btn-sm btn-default">
<span class="fa fa-pencil fw"></span> &nbsp;
<asp:literal runat="server" text="&nbsp;<%$ Resources:Main, EstimatedTimeCaption %>" />
<span data-bind="text: moment(waitingQueueClient.EstimatedConsultationTime).format($('#TimeFormat').html().trim())"></span>
<br />
<asp:literal runat="server" text="&nbsp;<%$ Resources:Main, ScheduledTimeCaption %>" />
<span data-bind="text: moment(waitingQueueClient.FixedConsultationDateTime).format($('#TimeFormat').html().trim())"></span>
</button>

最佳答案

Bootstrap 提供的 text-right 实用程序类将使这变得简单,但按钮类会覆盖它。我们需要更有力:

.btn.text-right {text-align: right !important;}

<button type="button" class="btn btn-sm btn-default text-right">
<span class="glyphicon glyphicon-pencil fw"></span> &nbsp;
Estimated Time:
<span>1:41 pm</span><br />
Scheduled Time:
<span>9:30 am</span>
</button>

Demo

请注意,我已将中断标记移动到与前面的跨度相同的行。将它放在下面会在第一行的末尾添加空格。

关于html - 对齐复杂的 Bootstrap 按钮布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29397182/

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