gpt4 book ai didi

javascript - 水平展开而不是垂直展开

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

正如您在下面的 gif 中看到的,我的 Tabs 正在垂直扩展。但是我希望它们水平扩展。我已经尝试使用 white-space:nowrap 和其他证明对其他人有用的东西,但它对我的情况不起作用。

Image Example

HTML:

<div class="l_tabs">
<div>
<ul id="myTab1" class="nav nav-tabs bordered">
<li class="tab-add">
<li class="contentTab">
<li class="contentTab">
<li class="contentTab">
<li class="contentTab">
<li class="contentTab">
<li class="contentTab active">
</ul>
</div>
</div>

CSS:

.l_tabs {
background: #474544 none repeat scroll 0 0;
display: block;
height: 57px;
overflow: auto;
white-space: nowrap;
width: 500px;
}
.l_tabs > div {
background-color: white;
height: 40px;
padding-top: 4px;
width: 99%;
}

最佳答案

.l_tabs{ } 中更改宽度

width: 500px;

width: 100%;

已更新

检查这个fiddle供大家引用。

这样就可以了!

关于javascript - 水平展开而不是垂直展开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38868260/

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