删除默认焦点轮廓并更改为不同的颜色 [英] Remove default focus outline and change to different color
本文介绍了删除默认焦点轮廓并更改为不同的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从我的联系人框中删除蓝色轮廓(颜色与我页面上的其他颜色冲突).我尝试了很多关于 SO 问题的建议但无济于事,但在 Chrome 和 Firefox 上得到了相同的结果.
I'd like to remove the blue outline from my contact box (the color clashes with the other colors on my page). I tried a bunch of things suggested on SO questions to no avail and get the same result on Chrome and Firefox.
这是我尝试过的:
input:focus, button:focus, textarea:focus, textarea:focus, input:active, button:active, textarea:active, input:active, input, textarea, button {
outline-style: none !important;
outline: none !important;
outline: 0 !important;
border: 1px solid #17a2b8; /* Turquoise color */
}
结果:
推荐答案
这是一种应用于焦点的 box-shadow
样式.
It's a box-shadow
style applied on focus.
添加此代码以将其删除:
add this code to remove it:
.form-control:focus {
box-shadow:none;
}
你可以添加 !important
取决于你的 CSS 顺序:
You may add !important
depending on your CSS order:
这篇关于删除默认焦点轮廓并更改为不同的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文