<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>表单伪类</title>
</head>
<body>
<!--
伪类:
1.结构伪类:根据元素位置获取元素
2.状态伪类:根据状态来获取元素 -->
<ul class="list">
<li class="first">item1</li>
<li>item2</li>
<li>item3</li>
<li>item4</li>
<li>item5</li>
<li>item6</li>
<li>item7</li>
<li>item8</li>
</ul>
<input type="text">
<input type="text" disabled>
<input type="radio" name="sex" id="m" value="0"><label for="m">男</label>
<input type="radio" name="sex" id="f" value="0"><label for="f">女</label>
<p>
<button>提交</button>
</p>
<style>
input:disabled{
background-color: yellow;
}
input:enabled{
background-color: cyan;
}
input:checked + label {
color:red;
}
button {
width:100px;
height:30px;
border: none;
outline: none;
background-color: seagreen;
color:white;
}
button:hover{
background-color: coral;
cursor: pointer;
}
input:focus{
background-color: red;
}
</style>
</body>
</html>