3-30动态伪类作业请检查下

来源:3-30 编程练习

从不学习

2021-08-03 21:16:54

相关代码:

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>动态伪类</title>
<style type="text/css">
/*此处写代码*/
p:first-child input:hover,p:nth-child(2) input:hover{
border: 1px solid red;
}
p:first-child input:focus{
background-color:orange;
}
p:nth-child(2) input:focus{
background-color:yellow;
}
</style>
</head>
<body>
<!-- 此处写代码 -->
<p>
用户名:<input type="text">
</p>
<p>
密码:<input type="password">
</p>
</body>
</html>


写回答

1回答

好帮手慕然然

2021-08-04

同学你好,代码实现效果没问题,继续加油,祝学习愉快!

0

前端工程师

前端入门如同写字,如果你不知道从哪开始,那就选择前端(含Vue3.x,React17,TS)

20327 学习 · 17877 问题

查看课程