笔记:动态伪类选择器

来源:互联网 发布:unity3d 文档 编辑:程序博客网 时间:2024/06/06 01:43
<!DOCTYPE html><html>    <head lang="en">        <meta charset="UTF-8">        <title>动态伪类</title>        <style type="text/css">            input:hover{                border:1px solid red;            }            .name:focus{                background:orange;            }            .pw:focus{                background:yellow;            }        </style>    </head>    <body>        <div>用户名:        <input type="text" class="name">        </div>        <div>密码:        <input type="text" class="pw">        </div>    </body></html>