链接地址:

    伪元素表单控件默认样式重置与自定义大全

    http://www.zhangxinxu.com/wordpress/?p=3381

    

    Chrome 现在不支持通过伪元素修改 meter 元素样式了

    https://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css#L1003

以下测试大部分都是在谷歌浏览器

1.隐藏input等表单的默认样式背景

  

textarea,select,input{-webkit-appearance: none; -moz-appearance: none; -o-appearance: none; appearance: none;}

2.清除input表单number的样式

  

input[type=number] {
-moz-appearance:textfield;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin:;
}

3.清除input表单checkbox的样式

  http://www.cnblogs.com/xyzhanjiang/p/3989836.html

  3.1 修改checkbox样式

<p class="agreement">
<input type="checkbox" id="checkbox">
<label for="checkbox"></label>
</p>
.agreement label {
cursor: pointer;
position: absolute;
width: 16px;
height: 16px;
top: 3px;
left:;
background: #eee;
border-radius: 100%;
} .agreement label:after {
opacity: 0.2;
content: '';
position: absolute;
width: 19px;
height: 17px;
background: url(../img/Other/checkbox1.png) 0 0px;
} .agreement label:hover::after {
opacity: 0.5;
} .agreement input[type=checkbox]:checked+label:after {
opacity:;
} input[type=checkbox] {
visibility: hidden;
}

4. 设置placeholder颜色

  

input::-webkit-input-placeholder {
color: #ccc;
}

5.去除表单后的上下小箭头

  

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
margin:;
}

css修改input表单默认样式重置与自定义大全的更多相关文章

  1. 利用CSS 修改input=radio的默认样式(改成选择框)

    html部分: <input id="item2" type="radio" name="item"> <label fo ...

  2. css实现input表单验证

    有没有办法只通过css来确定input标签是否有输入? 我有这个想法是因为我想完成一个自动补全的input部件,最基本的功能是: 如果input没有内容,这隐藏下拉框 反之,显示下拉框 我找到了一个也 ...

  3. ios下表单disabled样式重置

    在做最近的一个活动项目时,需要用到表单的disabled状态,但是在IOS下那颜色不是一般的浅,就跟没有一样,一开始通过如下样式重置: input:disabled, input[disabled]{ ...

  4. css修改select下拉列表的默认样式

    select的一些默认样式我们很难修改,比如图标的替换.接下来就说说如何修改这些默认样式: html代码: <div> <select name=""> & ...

  5. input时间表单默认样式修改(input[type="date"])

    一.时间选择的种类: HTML代码:选择日期:<input type="date" value="2018-11-15" /> 选择时间:<i ...

  6. CSS修改input[type=range]滑块样式

    input[type="range"]是html5中的input标签新属性,样子如下: <input type="range" value="4 ...

  7. css取消input、select默认样式(手机端)

    IOS端: background-color:transparent; border-color:transparent; andorid端: 仅仅使用上面的代码还不够,可以发现select框在某些浏 ...

  8. ios上表单默认样式

    摘自:http://blog.sina.com.cn/s/blog_7d796c0d0102uyd2.html 可惜不能直接转到博客园. input[type="button"], ...

  9. 纯css修改复选框默认样式

    input[type='checkbox']{ width: 20px; height: 20px; background-color: #fff; -webkit-appearance:none; ...

随机推荐

  1. Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position

    在source那边,执行: flush logs;show master status; 记下File, Position. 在target端,执行: CHANGE MASTER TO MASTER_ ...

  2. 玩转 ”hello word“,Python程序员大多数都没有实现过

    很多人学习Python很长时间,对于'hello word' 的认知,很多已经从事Python多年的程序员的认知也就只有: print(hello wrod) 但是有没有让hello word 变得不 ...

  3. u-boot全面分析

    uboot主Makefile分析1 uboot住Makefile分析参考:https://www.2cto.com/kf/201607/522424.html uboot version确定(Make ...

  4. linux 资料

    吾爱linux 摘自传智播客

  5. 随机森林和GBDT的几个核心问题

    随机森林random forest的pro和con是什么?优势是accuracy高,但缺点是速度会降低,并且解释性interpretability会差很多,也会有overfitting的现象. 为什么 ...

  6. linux 下隐藏进程的一种方法

    前言 本文所用到的工具在 https://github.com/gianlucaborello/libprocesshider 可以下载 思路就是利用 LD_PRELOAD 来实现系统函数的劫持 LD ...

  7. 一台服务器多实例mysql做主从复制

    在一台服务器上开两个端口的mysql(3306.3307),做成主从复制环境 1)安装mysql(安装过程这里就不做过多介绍) 参考:http://www.cnblogs.com/kevingrace ...

  8. Chrome F12调试

    F12 断点 F5 Esc 选择鼠标右击:编辑||hover样式 Sonrces go to file (ctrl+p) 搜搜文件名

  9. Linux内核分析期中总结

    目录: “Linux内核分析”实验一报告 “Linux内核分析”实验二报告 “Linux内核分析”实验三报告 Linux实验四报告 “Linux内核分析”第五周报告 "Linux内核分析&q ...

  10. <构建之法>10,11,12章的读后感

    第十章:典型用户和场景 问题 :什么是典型用户? 第十一章:软件设计与实现 问题 :开发人员的标准工作流程就是不断的发现BUg,修改bug来完善功能,在此过程中要等待同伴复审,在这阶段中,开发者应该如 ...