Chrome 下input的默认样式
一.去除默认边框以及padding
border: none;
padding:0
二.去除聚焦蓝色边框
outline: none;
三.form表单自动填充变色
1.给input设置内置阴影,至少要比你的input本身大。不过,box-shadow是很慢的,适当大小。而且,如果你的input是用图片做背景的话,是没有办法做这么干的。设置transparent也不可以。
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
-webkit-box-shadow: 0 0 0 100px white inset; //通过内阴影覆盖默认黄色背景
-webkit-text-fill-color: #333; //去除默认黑色字色
}
2.关闭自动补全
<input type="text" autocomplete="off">
3.设置背景变换过渡,可短时间内保持原本背景(支持透明)
transition: background-color 5000s ease-in-out 0s;
四.改变placeholder样式
input::-webkit-input-placeholder{color:rgba(0,0,0,0.3);}
input::-moz-input-placeholder{color:rgba(0,0,0,0.3);}
input::-ms-input-placeholder{color:rgba(0,0,0,0.3);}
input::-o-input-placeholder{color:rgba(0,0,0,0.3);}
Chrome 下input的默认样式的更多相关文章
- chrome下input文本框自动填充背景问题解决
chrome下input文本框会自动填充背景,只需要给文本框加一个样式即可解决问题 input:-webkit-autofill {-webkit-box-shadow: 0 0 0px 1000px ...
- 去除select下拉框默认样式
去除select下拉框默认样式 select { /*Chrome和Firefox里面的边框是不一样的,所以复写了一下*/ border: solid 1px #; /*很关键:将默认的select选 ...
- html5中如何更改、去掉input type默认样式
1.如何去掉input type=date 默认样式 HTML代码: 选择日期:<input type="date" value="2017-06-01" ...
- css去除chrome下select元素默认border-radius
在mac下的chrome,对于select元素会默认有一个border-radius,当然有些情况下并不需要圆角,所以就要去掉. 比较常用的方法是: .select { -webkit-appeara ...
- chrome下input[type=text]的placeholder不垂直居中的问题解决
http://blog.csdn.net/do_it__/article/details/6789699 <input type="text" placeholder=&qu ...
- css样式之input输入框默认样式
帮朋友写个简单的课程设计,后面会贴出来,项目刚开始就遇到一个坑(给input输入框设定样式,但是,点击后会出现蓝色边框),之前写其他的项目时也遇到过,百度一下资料解决了,现在又碰到了,写一下,留着备用 ...
- chrome 下 input[file] 元素cursor设置pointer不生效的解决
https://jingyan.baidu.com/article/48b558e32fabb67f38c09a81.html 环境是chrome浏览器,今天发现为html网页中的input [fil ...
- 去除input的默认样式
input, button, select, textarea { outline: none; -webkit-appearance: none; border-radius: 0; } outli ...
- Bootstrap修改input file默认样式
html部分 <div class="form-group"> <label class="col-sm-3 control-label"&g ...
随机推荐
- XLua----热更新
一.xLua 环境配置 1).Xlua中 Plugin Xlua复制到 需要热更新的工程中---->Assets子目录 2).开启宏HOTFIX_ENABLE File---->bui ...
- HTML标题 段落 样式
HTML 标题 标题(Heading)是通过 <h1> - <h6> 等标签进行定义的. <h1> 定义最大的标题.<h6> 定义最小的标题. 注释:默 ...
- JavaScript 功能类 Url.js
简书原文 这个类的主要目的是为了方便平时编码中的Url类型的数据操作 Github 全局名称 全局名称是由源码的最后一行代码确定的,默认为Url,如存在相同名称的对象会抛出异常: 可以通过 requi ...
- FFmpeg 学习(四):FFmpeg API 介绍与通用 API 分析
一.FFmpeg 相关术语 1. 容器/文件(Container/File):即特定格式的多媒体文件,比如MP4,flv,mov等. 2. 媒体流(Stream):表示在时间轴上的一段连续的数据,比如 ...
- [Swift]LeetCode456. 132模式 | 132 Pattern
Given a sequence of n integers a1, a2, ..., an, a 132 pattern is a subsequence ai, aj, ak such that ...
- [Swift]LeetCode886. 可能的二分法 | Possible Bipartition
Given a set of N people (numbered 1, 2, ..., N), we would like to split everyone into two groups of ...
- [Swift]LeetCode1016. 子串能表示从 1 到 N 数字的二进制串 | Binary String With Substrings Representing 1 To N
Given a binary string S (a string consisting only of '0' and '1's) and a positive integer N, return ...
- linux入门--Linux桌面环境(桌面系统)大比拼[附带优缺点]
早期的 Linux 系统都是不带界面的,只能通过命令来管理,比如运行程序.编辑文档.删除文件等.所以,要想熟练使用 Linux,就必须记忆很多命令. 后来随着 Windows 的普及,计算机界面变得越 ...
- javascript 使用小技巧总结
按位取反 ~a 即:返回 -(a+1),会去掉小数点. let a = 3.14; let b = ~a; //b = -(3.14+1) 取整 为-4: let c = ~b; //c = -(-4 ...
- 谷歌浏览器的各种插件网址Chrome插件(谷歌浏览器)-超级详细
各种各样的插件,可以查找对自己有用的,自行下载安装 http://chromecj.com/