删除Safari / Chrome textinput / textarea glow [英] Remove Safari/Chrome textinput/textarea glow
本文介绍了删除Safari / Chrome textinput / textarea glow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道当我使用CSS点击文本输入/文本区域时是否可以删除默认的蓝色和黄色光芒。
I am wondering if its possible to remove the default blue and yellow glow when I click on a text input / text area using CSS?
推荐答案
textarea, input, button { outline: none; }
虽然,有人认为保持光晕/轮廓实际上有助于辅助功能,
Although, it's been argued that keeping the glow/outline is actually beneficial for accessibility as it can help users see which Element is currently focused.
您还可以使用伪元素:focus
仅定位输入
You can also use the pseudo element :focus
to only target the inputs when the user has them selected.
演示: https ://jsfiddle.net/JohnnyWalkerDesign/xm3zu0cf/
这篇关于删除Safari / Chrome textinput / textarea glow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文