请老师检查

来源:2-17 编程练习

慕前端2064318

2019-08-01 16:45:36

<!DOCTYPE html>

<html>

  <head>

    <meta charset="UTF-8" />

    <title>动态伪类</title>

    <style type="text/css">

      input {

        width: 300px;

        height: 30px;

        border: 1px solid #999;

      }

      input[class='name']:focus {

        background-color: orange;

      }

      input[class='password']:focus {

        background-color: yellow;

      }


      /*此处写代码*/

    </style>

  </head>

  <body>

    <!-- 此处写代码 -->

    <span>用户名:<input type="text" class="name"/></span>

    <span>密码:<input type="text" class="password"/></span>

  </body>

</html>


写回答

1回答

好帮手慕糖

2019-08-01

同学你好,当鼠标悬浮在输入框上时,输入框边框颜色为红色这个没有实现哦,建议:可以添加下hover,例:

http://img.mukewang.com/climg/5d42c6d30001108e03790131.jpg

希望能帮助到你,欢迎采纳。

祝学习愉快!

0

0 学习 · 5012 问题

查看课程

相似问题