1、设置移动设备上点击元素时出现的高亮颜色
html
*{
-webkit-tap-highlight-color: transparent;
}
2、如果你想要自定义按钮的样式,你可以使用 -webkit-appearance: none;
来移除按钮的默认样式
html
.button {
-webkit-appearance: none;
appearance: none; /* 兼容性更好的通用语法 */
border: 1px solid #ccc;
padding: 10px 20px;
background-color: #f0f0f0;
color: #333;
font-size: 16px;
}
3、当您在输入框(input
元素)中输入内容后,某些浏览器会自动为获得焦点的输入框添加一个轮廓(outline
),

使用inpt:focu属性去除
html
.search input:focus {
outline: none;
}
效果如下
