当其他可折叠的东西打开时,如何隐藏折叠?我知道已经有可能用Bootstrap Accordion来做,但我不喜欢这些效果。我只是希望它立即隐藏起来,只是显示开幕式崩溃的效果。
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<a data-toggle="collapse" data-target="#colcon-1" aria-expanded="false">
Collapse Content 1
</a>
<a data-toggle="collapse" data-target="#colcon-2" aria-expanded="false">
Collapse Content 2
</a>
<div class="collapse" id="colcon-1">
<p>Collapsible content 1</p>
</div>
<div class="collapse" id="colcon-2">
<p>Collapsible content 2</p>
</div>
答案 0 :(得分:0)
您可以使用手风琴并禁用关闭过渡。
MouseArea
.collapsing[aria-expanded="false"] {
-webkit-transition: none;
-o-transition: none;
transition: none;
}
HTML来自documentation。