1、a标签在移动端点击出现浅蓝色背景
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;
}2、onclick事件在移动端点击出现黑色背景,需在点击的元素样式里面加下面代码
-webkit-tap-highlight-color:transparent3、input标签在移动端出现圆角以及黑色阴影
input[type=text] { -moz-appearance:textfield;}
input[type=text]::-webkit-inner-spin-button,input[type=text]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0;}
本文介绍了解决移动端Web页面中a标签点击高亮、onclick事件黑色背景及input标签圆角和阴影等问题的方法。通过CSS属性-webkit-tap-highlight-color设置为transparent来消除点击高亮效果,并使用-moz-appearance:textfield移除input文本框的默认样式。
2198

被折叠的 条评论
为什么被折叠?



