修改input搜索框默认叉号的样式为自定义图片

 input::-webkit-search-cancel-button {
            -webkit-appearance: none;
            position: relative;
            height: 15px;
            width: 15px;
            border-radius: 50%;
            background: url("1.jpg") no-repeat center;
            background-size: 100% 100%;
            color:rgba(0,0,0,0);
        }
 input[type=search]::-ms-clear {
            appearance: none;
            position: relative;
            height: 15px;
            width: 15px;
            border-radius: 50%;
            background: url("1.jpg") no-repeat center;
            background-size: 100% 100%;
            color:rgba(0,0,0,0);
        }

评论

暂无评论