当前位置:首页 > 技术分享

input search更改默认删除按钮的样式

admin6年前 (2020-11-23)技术分享5677

改input输入框search属性下输入文字之后会在输入框最后出现一个默认样式的X不过这个样式不太好看想自定义怎么办呢

方法一

input[type="search"]::-webkit-search-cancel-button {
      -webkit-appearance: none;
      height: 16px;
      width: 16px;
      background: url(https://yxs-web.oss-cn-beijing.aliyuncs.com/328e4d97f9d0d68ea04e872f68e508e3.png) no-repeat;
      background-size: contain;
    }

方法二(禁用掉样式就好了,再自己往上加样式.)

input::-webkit-search-cancel-button {
  display: none;
}

扫描二维码推送至手机访问。

版权声明:本文由小刚刚技术博客发布,如需转载请注明出处。

本文链接:https://blog.bitefu.net/post/92.html

标签: css
分享给朋友:

“input search更改默认删除按钮的样式” 的相关文章

PIP 更换国内安装源linux/windows

pip国内的一些镜像  阿里云 http://mirrors.aliyun.com/pypi/simple/   中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/   豆瓣(…

Chrome 最全历史版本下载以及chromedriver下载

https://vikyd.github.io/download-chromium-history-version/#/ https://dl.lancdn.com/landian/soft/chrome/m/ chromedriver的版…

apicloud影视APP源码 无需后台

apicloud影视APP源码 无需后台

介绍集合vip影视接口到一个android app中 方便观看各平台影视资源及直播开源地址:https://gitee.com/web/vip_yingshi软件架构使用apicloud搭建影视APP源码,无后台,调用接口同步api解析网址…

python3 selenium webdriver.Chrome php 爬取汽车之家所有车型详情数据[开源版]

介绍本接口是车型库api的补充,用于爬取汽车之家所有车型详情数据开源地址:https://gitee.com/web/CarApi/tree/master/python软件架构python3 selenium webdriver.Chrom…

python 高速处理分析超大网站日志文件 带进度条手动输入日志文件

 python 高速处理分析超大网站日志文件 带进度条手动输入日志文件    1 统计本日志文件的总pv、uv    2 列出全天每小时的pv、uv数    3 列出to…

阿里云盘 分享脚本 抢先实现文件分享功能

Win端基本所有浏览器均可进行安装安装地址:https://bbs.tampermonkey.net.cn/thread-427-1-1.html如何安装:Tampermoneky安装:谷歌浏览器参考:https://bbs.tamperm…

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。