gpt4 book ai didi

css - Bootstrap去除按钮点击效果

转载 作者:太空宇宙 更新时间:2023-11-03 22:40:41 25 4
gpt4 key购买 nike

我一直在尝试找到我需要在 Bootstrap 中更改的相关 css,以防止在单击按钮时产生这种影响(见附图)

enter image description here

非常感谢任何帮助!

编辑:这是相关代码:

    <div class="btn-group" dropdown container="body">
<button dropdownToggle type="button" class="btn dropdownToggle" style="background-color:#337ab7;color:white;">
Views <span class="caret"></span>
</button>
</div>

编辑 2:我设法用这段代码删除了边框:

.btn:focus,
.btn:active:focus,
.btn.active:focus,
.btn.focus,
.btn:active.focus,
.btn.active.focus {
outline: none;
}

但是,当我点击按钮时仍然有效果(见下图):

enter image description here

是否也可以删除它?

最佳答案

你必须设置.btn:focus {outline: 0;}。如果您需要全局移除焦点,只需使用此 :focus {outline: 0;}

对于第二个问题只需使用

.btn.active, 
.btn:active {
box-shadow: none;
}

关于css - Bootstrap去除按钮点击效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44164468/

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