<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>UI元素状态伪类选择器</title>
<style type="text/css">
input[type="text"]:hover
{
background-color:red;
}
input[type="text"]:focus
{
background-color:skyblue;
}
input[type="text"]:active
{
background-color:yellow;}
li input[type="text"]:enabled
{
background-color:#936}
li input[type="text"]:disabled
{
background-color:#0F0;}
</style>
</head>
<body>
<form>
<p>姓名:<input type="text" name="name"></p>
<p>地址:<input type="text" name="address"></p>
<fildset>
<ul>
<li><input type="text" value="可用状态"></li>
<li><input type="text" value="可用状态"></li>
<li><input type="text" value="禁用状态" disabled="disabled"></li>
<li><input type="text" value="禁用状态" disabled="disabled"></li>
</ul>
</fildset>
</form>
</body>
</html>
13、UI元素状态伪类选择器
最新推荐文章于 2023-06-17 17:36:30 发布