“Sel checked”的版本间差异
本页内容
(创建页面,内容为“{{DISPLAYTITLE::checked}}1 = CSS3 :checked 选择器 = 完整CSS选择器参考手册 为所有选中的输入元素设置背景颜色: <sample title="" desc="" lang="html" hererun="1"> input:checked { height: 50px; width: 50px; } </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> input:checked { height: 50px; width…”) |
无编辑摘要 |
||
(未显示同一用户的1个中间版本) | |||
第1行: | 第1行: | ||
{{DISPLAYTITLE::checked}}[[Category:css | {{DISPLAYTITLE::checked}}[[Category:css selectors|42]] | ||
= CSS3 :checked 选择器 = | = CSS3 :checked 选择器 = | ||
第45行: | 第45行: | ||
{| class="table table-striped table-hover" | {| class="table table-striped table-hover" | ||
! 选择器 | ! 选择器 | ||
! | ! Chrome | ||
! | ! Internet Explorer / Edge | ||
! | ! Firefox | ||
! | ! Safari | ||
! | ! Opera | ||
|- | |- | ||
| :checked | | :checked |
2022年8月19日 (五) 04:50的最新版本
CSS3 :checked 选择器
为所有选中的输入元素设置背景颜色:
示例
input:checked {
height: 50px;
width: 50px;
}
定义和用法
- checked 选择器匹配每个选中的输入元素(仅适用于单选按钮或复选框)。
浏览器支持
表格中的数字表示支持该属性的第一个浏览器版本号。
选择器 | Chrome | Internet Explorer / Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
:checked | 4.0 | 9.0 | 3.5 | 3.2 | 9.6 |