默认情况下,您如何将卡片中的评论保持打开状态?截至目前,这是我的代码:
<div class="card">
<h3 class="card-heading simple">Simple News Card</h3>
<div class="card-body">
...
</div>
<div class="card-comments">
<div class="comments-collapse-toggle">
<a data-toggle="collapse" data-target="#c1-comments" href="#c1-comments">34 comments <i class="icon-angle-down"></i></a>
</div>
<div id="c1-comments" class="comments collapse">
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" data-src="holder.js/28x28" alt="avatar"/>
</a>
<div class="media-body">
<h4 class="media-heading">Comment title</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam...</p>
</div>
</div>
</div>
</div>
</div>
(从Bootplus复制)
但默认情况下会隐藏评论,当您点击 34条评论链接时,评论会在打开和关闭之间切换..
默认情况下如何保持打开状态?
答案 0 :(得分:2)
如果您可以修改HTML,则可以执行以下操作:
<div id="c1-comments" class="comments in collapse" style="height: auto">