html5表单和伪类
2015-08-29 21:31
871 查看
type = "email"; 自带验证格式
type = "url"; 网址 http//:
type = "tel";移动端会变成数字键盘
type = "search";输入的时候多出x ,适合移动端
type = "range"; min="最小值" max = "最大值" step = "跳动" value = "当前值";数值选择器;
type = "number" min="最小值" max = "最大值" step = "跳动"; 数字控件 ;
type = "color";颜色控件;
type = "datetime-local"; 时间控件;
type = "time" ; 时分;
type = "data" ; 年月日;
type = "week" ; 一年的第几周;
type = "month" ; 一年的第几个月;
type = "password" 密码框
表单属性
placeholder = "请输入内容";
用伪类设置颜色 input::placeholder( color ); 注意兼容
《 autocomplete : "off/on" 提示 list = "list";
datalist id="list" 标签 > option 控制提示下拉内容 》
autofocus 页面加载完获得焦点
required 提交内容不为空
pattern = "";正则验证
formction = ""提交地址 写在submit提交按钮上
validity对象
lnvalid事件 :验证反馈 formnovalidate属性 : 关闭验证
属性选择器
input[ type = "submit" ]{ 样式 }
词列表 ~= ^= $= |=
div:target伪类 可以做选项卡 锚点 hash (哈希)
disabled 不可点击的表单控件
endbled 可点击的表单控件
checked 默认选中
.box~p 后面的所有元素
.box+* 相邻的一个
:first-line 第一行
:fiest-letter 第一个字
::selection 设置点击之后背景
:not( 元素 ) 排除
type = "url"; 网址 http//:
type = "tel";移动端会变成数字键盘
type = "search";输入的时候多出x ,适合移动端
type = "range"; min="最小值" max = "最大值" step = "跳动" value = "当前值";数值选择器;
type = "number" min="最小值" max = "最大值" step = "跳动"; 数字控件 ;
type = "color";颜色控件;
type = "datetime-local"; 时间控件;
type = "time" ; 时分;
type = "data" ; 年月日;
type = "week" ; 一年的第几周;
type = "month" ; 一年的第几个月;
type = "password" 密码框
表单属性
placeholder = "请输入内容";
用伪类设置颜色 input::placeholder( color ); 注意兼容
《 autocomplete : "off/on" 提示 list = "list";
datalist id="list" 标签 > option 控制提示下拉内容 》
autofocus 页面加载完获得焦点
required 提交内容不为空
pattern = "";正则验证
formction = ""提交地址 写在submit提交按钮上
validity对象
lnvalid事件 :验证反馈 formnovalidate属性 : 关闭验证
属性选择器
input[ type = "submit" ]{ 样式 }
词列表 ~= ^= $= |=
div:target伪类 可以做选项卡 锚点 hash (哈希)
disabled 不可点击的表单控件
endbled 可点击的表单控件
checked 默认选中
.box~p 后面的所有元素
.box+* 相邻的一个
:first-line 第一行
:fiest-letter 第一个字
::selection 设置点击之后背景
:not( 元素 ) 排除
相关文章推荐
- HTML5 元素拖放
- H5中form表单中新增属性
- 基于CDH5.4的Spark1.4.1下SparkR的部署
- input中加入图片的做法
- html5中canvas 错误集锦1(8.28)
- 手机H5 web调试利器——WEINRE (WEb INspector REmote)
- 手机上实现图片旋转
- html5压缩图片并上传
- HTML5中Canvas画线技巧大全
- 利用canvas的rotate创建一个简易的风车动画
- ionic结合HTML5实现打电话功能
- ionic结合HTML5实现打电话功能
- html5 时间格式的问题
- HTML5所有标签汇总按功能
- HTML5 Web存储(Web Storage)技术及用法
- 详解HTML5中的<aside>元素与<article>元素
- html5中本地存储Web Storage
- 响应式Web设计(HTML5和CSS3)工具集
- Win10最新bulid预览版继续改进Edge的HTML5性能
- HTML5学习记录——3