小白教程
所有教程
关于
Search
172.70.126.8
172.70.126.8
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Sel read write”的源代码
本页内容
上一节:
Sel_in_range
下一节:
Sel_read_only
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE::read-write}}[[Category:css selectors|47]] = CSS :read-write 选择器 = [[css selectors|完整CSS选择器参考手册]] 如果 input 元素不是只读,即没有 "readonly" 属性,设置输入框样式为黄色: <sample title="" desc="" lang="html" hererun="1"> input:read-write { background-color: yellow; } </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> input:read-write { background-color: yellow; } </style> </head> <body> <h3> :read-write 选择器实例演示。</h3> <p>普通的input元素:<br><input value="hello"></p> <p>只读的input元素:<br><input readonly value="hello"></p> <p> :read-write 选择器选取没有设置 "readonly" 属性的元素。</p> </body> </html> </run> == 定义和使用 == :read-write 选择器用于匹配可读及可写的元素。 '''注意:''' 目前, 在大多浏览器中, :read-write 选择器只使用于设置了input 和 textarea 元素。 == 浏览器支持 == 表格中的数字表示支持该属性的第一个浏览器版本号。 {| class="table table-striped table-hover" ! 选择器 ! Chrome ! Internet Explorer / Edge ! Firefox ! Safari ! Opera |- | :read-only | 支持 | 不支持 | -moz- | Yes | Yes |} == CSS 语法 == <pre> :read-write { css 声明; } </pre> == 相关页面 == CSS 选择器 [[sel read only|:read-only]] [[css selectors|完整CSS选择器参考手册]]
返回至“
Sel read write
”。
上一节:
Sel_in_range
下一节:
Sel_read_only