老师麻烦检查下
来源:2-17 编程练习
豆包侠
2021-10-09 09:53:21
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>动态伪类</title>
<style type="text/css">
input[type="text"]:hover{
border:1px solid #f00;
}
input[name="用户名"]:focus{
background:orange;
}
input[name="密码"]:focus{
background:yellow;
}
</style>
</head>
<body>
<span>用户名:</span><input type="text" name="用户名" ><br/>
<span>密码</span> <input type="text" name="密码" >
</body>
</html>
1回答
好帮手慕星星
2021-10-09
同学你好,代码实现效果很棒!
建议:name值可以使用英文,规范一些
祝学习愉快!