移动端html5中a标签链接点击后蓝色阴影怎么去掉

一、取消a标签在移动端点击时的蓝色

-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
-webkit-user-select: none;
-moz-user-focus: none;
-moz-user-select: none;
复制代码

二、使用图片作为a标签的点击按钮时,当触发touchstart的时候,往往会有一个灰色的背景

a,a:hover,a:active,a:visited,a:link,a:focus{
    -webkit-tap-highlight-color:rgba(0,0,0,0);
    -webkit-tap-highlight-color: transparent;
    outline:none;
    background: none;
    text-decoration: none;
}
复制代码

三、改变选中内容的背景颜色

::selection { 
    background: #FFF; 
    color: #333; 
} 
::-moz-selection { 
    background: #FFF; 
    color: #333; 
} 
::-webkit-selection { 
    background: #FFF; 
    color: #333; 
} 
复制代码

 四、去除ios input框点击时的灰色背景

-webkit-tap-highlight-color:rgba(0,0,0,0);
复制代码

转载于:https://juejin.im/post/5cfbba36f265da1bb13f23ca

猜你喜欢

转载自blog.csdn.net/weixin_33797791/article/details/91428848