老师麻烦检查下

来源: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值可以使用英文,规范一些

https://img.mukewang.com/climg/6160f7d3090a256307250509.jpg

祝学习愉快!

0

0 学习 · 40143 问题

查看课程