input搜索框:根据历史记录自动填充后,去除默认黄色背景
如果是纯色背景,直接通过box-shadow覆盖即可:
input:-webkit-autofill {
color: #333!important;
-webkit-text-fill-color: #333;
box-shadow: 0 0 0 1000px #eaeaea inset
}
input:autofill {
color: #333!important;
-webkit-text-fill-color: #333;
box-shadow: 0 0 0 1000px #eaeaea inset
}
如果是透明色背景,通过transition设置足够长的变色推迟:
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
color: #fff !important;
-webkit-text-fill-color: #fff;
-webkit-transition: background-color 43200s ease-in-out 0s;
transition: background-color 43200s ease-in-out 0s;
}
input:autofill,
input:autofill:hover,
input:autofill:focus {
-webkit-text-fill-color: #fff;
-webkit-transition: background-color 43200s ease-in-out 0s;
transition: background-color 43200s ease-in-out 0s;
}
input搜索框:根据历史记录自动填充后,去除默认黄色背景的更多相关文章
- 去掉chrome记住密码后自动填充表单的黄色背景
chrome表单自动填充后,input文本框的背景会变成黄色的,通过审查元素可以看到这是由于chrome会默认给自动填充的input表单加上input:-webkit-autofill私有属性,然后对 ...
- 如何修改chrome记住密码后自动填充表单的黄色背景 ?
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill { background-color: rgb(2 ...
- 解决Chrome下表单自动填充后背景色为黄色
Chrome浏览器在表单自动填充后会显示黄色背景,这是Chrome的私有属性导致,对于有洁癖的人来讲,是不喜欢的,我们可以手动去掉. 代码如下: input:-webkit-autofill { -w ...
- input搜索框实时检索功能实现(超简单,核心原理请看思路即可)
问题:实现input搜索框实时检索的功能,类似哔哩哔哩首页搜索功能(壮哉我大b站!).公司要求,emmmm没办法,果然懒人是要被赶着走才会进步的说,诶嘿O(∩_∩)O. 解决方法: 1.参考资料:ht ...
- input type=password 浏览器会自动填充密码的问题
解决办法是在form上或input上添加autoComplete="off"这个属性. form表单的属性如下所示: 但是这个解决方案在谷歌和火狐上均有bug,下面来一个一个解决. ...
- JS,JQ及时监听input值的变化,MUI的input搜索框里的清除按钮的点击监听事件
JS: document.getElementById("input对象的ID").addEventListener('input',function(){ console.log ...
- input placeholder 在chrome 浏览器自动填充时,背景色覆盖原有背景图片问题。
user-block-name, .user-block-pwd { margin-bottom: 10%; text-align: center; position: relative; } .us ...
- CHROME下去掉保存密码后输入框变成黄色背景样式
之前没遇到过这种情况,现在打开这个页面后,手机号和密码都已经输入了,而且还显示的是黄色背景,清了下cookie,没有解决问题.请教了下大神,先把方法整理到这儿. 用代码审查看了input样式有如下样式 ...
- 【jQuery】input框输入手机号自动填充空格
<input type="tel" id="tel"> $("#tel").keyup(function(){ _self = ...
随机推荐
- Windows Server 2008 R2 免费使用900天的方法
无需破解:Windows Server 2008 R2 免费使用900天的方法 1.安装后就有一个180天的试用期. 2.在180天试用期即将结束时,使用下面的评估序列号激活Server 2008 R ...
- python-css基础知识
CSS 是指层叠样式表 (Cascading Style Sheets),样式定义如何显示html,用于对页面进行美化. css样式的存放位置有三种: 第一种,直接写在html标签里: <div ...
- php国家或者编码英文字母排序
1.直接复制传入需要排序的字符,然后可以把返回的数据当key,传送给前台function getFirstCharter($str){ if(empty($str)){return '';} $fch ...
- mac常用操作
Command+Shift+. 可以显示隐藏文件.文件夹 touch a.txt 新建txt文件
- 322. Coin Change零钱兑换
网址:https://leetcode.com/problems/coin-change/ 典型的动态规划问题,类比背包问题,这就是完全背包问题 问题的阶段:对数值 i 凑硬币 问题的状态:对数值 i ...
- round函数解决oracle报错"OCI-22053: 溢出错误"的问题
继上次公司网站报错除数为0的问题,这次又来报错溢出错误,还是同一条语句!搜索网上的解决方法,发现问题描述和解决方法如下: Oracle 数值数据类型最多可存储 38 个字节的精度.当将 Oracle ...
- 微信小程序页面跳转导航wx.navigateTo和wx.redirectTo
}) wx.redirectTo(OBJECT) 关闭当前页面,跳转到应用内的某个页面. 还是用上面的三张图示作为例子,当使用wx.redirctTo接口跳转页面时,原来的页面将被删除掉,当然,这是小 ...
- Spring Boot(一)
(一)如何使用IDEA新建一个Spring Boot项目 https://www.cnblogs.com/wmyskxz/p/9010832.html
- vue-swiper 基于Vue2.0开发 轻量、高性能轮播插件
vue-swiper 基于 Vue2.0 开发,基本满足大部分功能 轻量.高性能轮播插件.目前支持 无缝衔接自动轮播.无限轮播.手势轮播 没有引入第三方库,原生 js 封装,打包之后只有 8.2KB ...
- onceAgain, 这是一个py群的群公告说明
群规: 1. 不骚扰人 2. 不涉及娱乐政治 3. 主要就这两条 入门参考:https://book.douban.com/review/9547077/ qq群/网盘:523445644 # 加群 ...