css--兼容input[type=search]的清除按鈕的樣式
/*--清除谷歌瀏覽器下的 search 叉號*/
input::-webkit-search-cancel-button {
-webkit-appearance: none;
position: relative;
height: 15px;
width: 15px;
border-radius: 50%;
background: url("../../jq/img/down-icon.png") no-repeat center;
background-size: 100% 100%;
}
/*--清除IE下的 search 叉號*/
input[type=search]::-ms-clear {
color: transparent;
position: relative;
height: 15px;
width: 15px;
border-radius: 50%;
background: url("../../jq/img/down-icon.png") no-repeat center;
background-size: 100% 100%;
}
備註:ie下需要設置
color: transparent;