- 产生原因:由于Chrome默认会给自动填充的input表单加上
input:-webkit-autofill
私有属性造成的 - 解决方案1:在form标签上直接关闭了表单的自动填充:
autocomplete="off"
- 解决方案2:
input:-webkit-autofill { background-color: transparent; }
input [type=search] 搜索框右侧小图标如何美化?
input[type="search"]::-webkit-search-cancel-button{
-webkit-appearance: none;
height: 15px;
width: 15px;
border-radius: 8px;
background:url("images/searchicon.png") no-repeat 0 0;
background-size: 15px 15px;
}