outline:none; does NOT WORK - Only -webkit-appearance:none; is working - what is wrong here?

佐手、 提交于 2019-12-05 05:24:09
Nena Moss

If you use outline:none; please add a focus style. See http://outlinenone.com/.

This feature is very helpful when a mouse isn't used. Outline provides an important accessibility feature, so please, if you must remove it, add back a style for your links focus and active states. Please help users understand where links exist.

Try with this: -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

Use -webkit-appearance: none;

#yourElement:focus {
    -webkit-appearance: none;
}

#yourElement:hover {
    -webkit-appearance: none;
}

And it will do the trick.

Mobile Safari apparently just doesn't have a default outline style, so you don't have to worry about it. For a guaranteed consistent look in all browsers, desktop and mobile, I would recommend setting outline: none anyways, though.

a, :visited{ 
    outline: 0;
    outline: none;
}
:hover, :active, :focus{
    outline: 0;
    outline: none;
}

removed the focused glow for me on Chrome/osx, iphone/mobile safari, firefox/osx http://jsfiddle.net/toniehock/QQGnj/6/show

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!