gpt4 book ai didi

jquery - 如何为响应式标签添加背景

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

我正在使用这个插件:https://github.com/samsono/Easy-Responsive-Tabs-to-Accordion创建垂直响应选项卡区域。我想为这个区域添加背景颜色。所以我用一个 div 包裹那个区域并给它一个名为 superdemo 的类并添加这个 css:

.super-demo{
width:960px;
margin: 200px auto 0;
background: #FFF;
padding:40px;
}

这是我的 html:

<div class="super-demo">
<!--vertical Tabs-->
<div id="verticalTab">
<ul class="resp-tabs-list">
<li>Responsive Tab 1</li>
<li>Responsive Tab 2</li>
<li>Responsive Tab 3</li>
<li>Long name Responsive Tab 4</li>
</ul>
<div class="resp-tabs-container">
<div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh urna, euismod ut ornare non, volutpat vel tortor. Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis urna gravida mollis.</p>
</div>
<div>
<p>This tab has icon in it.</p>
</div>
<div>
<p>Suspendisse blandit velit Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis urna gravid urna gravid eget erat suscipit in malesuada odio venenatis.</p>
</div>
<div>
<p>d ut ornare non, volutpat vel tortor. Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis urna gravida mollis.Suspendisse blandit velit eget erat suscipit in malesuada odio venenatis.</p>
</div>
</div>
</div>


</div>

但奇怪的是,它并没有覆盖整个区域。是的,我可以为 superdemo div 设置高度,但我不想这样做,所以将来我可以添加尽可能多的内容,而不必再次计算高度。这是实时链接:http://banglapdf.net/testit/Index.html

我该怎么办?

最佳答案

添加

overflow:hidden; 

到你的包装器 css..(.super-demo 类)

关于jquery - 如何为响应式标签添加背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24480390/

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