gpt4 book ai didi

jquery - Bootstrap 3 数据切换 Accordion

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

这是我的

<a data-toggle="collapse" href="#collapsible-1">Digital</a>

<div id="collapsible-1">
HTML stands for HyperText Markup Language. HTML is the main markup language for describing the structure of Web pages.</a>
</div>

<a data-toggle="collapse" href="#collapsible-2">Radio</a>

<div id="collapsible-2">
HTML stands for HyperText Markup Language. HTML is the main markup language for describing the structure of Web pages.</a>
</div>

我使用 data-toggle boostrap 来显示和隐藏元素,但我有一些小问题,这样,当页面加载时,可折叠的内容总是可见的,即使我必须做两次单击以关闭该元素,然后就可以正常工作了。你认为我必须做什么,才能折叠元素内容以在页面加载时始终隐藏?

最佳答案

取自Bootstrap's documentation :

Usage
The collapse plugin utilizes a few classes to handle the heavy lifting:

.collapse hides the content
.collapse.in shows the content
.collapsing is added when the transition starts, and removed when it finishes

简而言之:<div id="collapsible-1" class='collapse'>

关于jquery - Bootstrap 3 数据切换 Accordion ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21258863/

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