请老师检查代码

来源:3-30 编程练习

枫霖霖

2021-07-05 15:56:18

<!DOCTYPE html>

<html>

    <head>

        <meta charset="UTF-8">

        <title>动态伪类</title>

        <style type="text/css">

            input[type="text"]:focus{

                background-color:orange;

            }

            input[type="passwork"]:focus{

                background-color:yellow;

            }

            input:hover{

                border:1px solid red;

            }

        </style>

    </head>

    <body>

        <p>用户名:<input type="text"></p>

        <p>密码:<input type="passwork"></p>

    </body>

</html>


写回答

1回答

好帮手慕慕子

2021-07-05

同学你好,代码实现是正确的,建议优化:使用form标签包裹所有表单项,让代码更加规范。

祝学习愉快~

0

0 学习 · 15276 问题

查看课程