gpt4 book ai didi

css - 从 Bootstrap 5 Accordion 按钮中删除轮廓

转载 作者:行者123 更新时间:2023-12-04 22:43:51 26 4
gpt4 key购买 nike

当您查看 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>

最佳答案

要删除阴影和蓝色边框颜色...

.accordion-button:focus {
box-shadow: none;
border-color: rgba(0,0,0,.125);
}
Demo

关于css - 从 Bootstrap 5 Accordion 按钮中删除轮廓,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66489725/

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