CSS-表单伪类选择器
来源:互联网 发布:淘宝虚假宣传如何处罚 编辑:程序博客网 时间:2024/05/21 11:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表单伪类选择器</title>
<style>
form *:focus{
/*background-color: pink;*/
}
form *:valid{
/*background-color: green;*/
}
form *:invalid{
/*background-color: red;*/
}
form *:required{
background-color: blue;
}
form *:optional{
background-color: yellow;
}
form *:default{
outline: 1px solid red;
}
form *:checked{
outline: 1px solid blue;
}
</style>
</head>
<body>
<form action="">
<input type="text">
<input type="text" required>
<br>
<input type="tel" required pattern="\d{4}">
<input type="radio" checked name="gender">
<input type="radio" name="gender">
<input type="radio" name="gender">
<input type="radio" name="gender">
</form>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表单伪类选择器</title>
<style>
form *:focus{
/*background-color: pink;*/
}
form *:valid{
/*background-color: green;*/
}
form *:invalid{
/*background-color: red;*/
}
form *:required{
background-color: blue;
}
form *:optional{
background-color: yellow;
}
form *:default{
outline: 1px solid red;
}
form *:checked{
outline: 1px solid blue;
}
</style>
</head>
<body>
<form action="">
<input type="text">
<input type="text" required>
<br>
<input type="tel" required pattern="\d{4}">
<input type="radio" checked name="gender">
<input type="radio" name="gender">
<input type="radio" name="gender">
<input type="radio" name="gender">
</form>
</body>
</html>
阅读全文
0 0
- CSS-表单伪类选择器
- css选择器-伪类选择器
- CSS伪类选择器
- CSS-伪类选择器
- CSS选择器&伪类
- CSS-伪类选择器
- CSS伪类选择器
- CSS伪类选择器
- CSS伪类选择器
- CSS伪类选择器
- CSS-伪类选择器
- CSS 伪类选择器
- CSS结构伪类选择器
- 关于CSS伪类选择器
- CSS ::selection伪类选择器
- css 伪类选择器相关
- CSS的伪类选择器
- CSS-伪类子代选择器
- Linux7 MySQL安装卸载教程
- Android中插件开发篇之----应用换肤原理解析
- Linux oracle监听启动失败
- unity包内的内容读取
- 详解Javascript中正则表达式的使用
- CSS-表单伪类选择器
- dpvs 连接会话老化处理逻辑
- 2016 ACM/ICPC 青岛赛区网络赛 XM Reserves
- C#的远程post与get
- C#基础(7)——方法(函数)
- Lable+input 單選標籤的單擊事件執行兩次
- CSS-伪元素选择器
- qrcode动态生成二维码
- gulp详细入门教程