gpt4 book ai didi

css - 修改 bootstrap 4 table-thead 中的对齐文本

转载 作者:太空宇宙 更新时间:2023-11-04 07:54:35 24 4
gpt4 key购买 nike

试图修改我表格中的样式。在本例中,文本将只使用一行。为此,我想使用:

white-space: nowrap;

.table-font-size {
font-size: 13px;
white-space: nowrap;
}
<table class="table table-hover table-sm table-responsive table-bordered table-font-size">
<thead class="thead-default">
<tr>
<th class="thead-nowrap" th:text="#{large.text1}">Large text 1</th>
<th class="thead-nowrap" th:text="#{large.text2}">Large text 2</th>
<th class="thead-nowrap" th:text="#{large.text3}">Large text 2</th>
</tr>
</thead>
</table>

适用于所有表格,但我不希望这样。

有什么建议吗?

谢谢

最佳答案

试试这个:

 .table .thead-nowrap{
white-space: nowrap;
}

关于css - 修改 bootstrap 4 table-thead 中的对齐文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47455115/

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