当你 checkout Bootstrap 5 accordion时,你会看到一个轮廓。我想删除它。我不确定是哪个元素实际上产生了轮廓,但我怀疑是button
。无论如何,我已经尝试将以下内容应用于所有可能的元素:
.accordion-item, .accordion-item:focus, .accordion-item:active,
.accordion-header, .accordion-header:focus, .accordion-header:active,
.accordion-button, .accordion-button:focus, .accordion-button:active {
outline: none !important;
}
好像什么都不管用。有什么办法吗?
下面是html代码的副本:
<div class="accordion" id="accordionExample">
<div class="accordion-item">
<h2 class="accordion-header" id="headingOne">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Accordion Item #1
</button>
</h2>
<div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
<div class="accordion-body">
...
</div>
</div>
</div>
</div>
3条答案
按热度按时间j91ykkif1#
若要删除阴影和蓝色边框颜色...
Demo
aurhwmvo2#
您可以使用
sqxo8psd3#
在这里它将工作: