以下是要使用的代码:
$('.collapse').on('shown.bs.collapse', function() {
$("span").addClass('glyphicon-chevron-up').removeClass('glyphicon-chevron-down');
});
$('.collapse').on('hidden.bs.collapse', function() {
$("span").addClass('glyphicon-chevron-down').removeClass('glyphicon-chevron-up');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="panel-group" id="accordionMessagesSetup">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordionMessagesSetup" href="#collapseMessagesSetup">
<span class="glyphicon glyphicon-chevron-up"></span>
Message Setup
</a>
</h4>
</div>
<div id="collapseMessagesSetup" class="panel-collapse collapse in">
<div class="container">
<p> my content goes here... </p>
</div>
</div>
</div>
</div>
</div>
如何移除面板周围的边框,除了顶部边框?我想要顶部边框,但不是左边,右边或底边的边框。 对不起,如果它看起来太简单;我只是对整个Web开发堆栈的新手。