0010-伪类选择器-前端学习笔记

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        /*伪类选择器,专门用来表示元素的一种状态
        *比如访问过的链接::visited
        *正常链接 :link
        *鼠标滑过的链接 :hover
        *正在点击的链接 :active
        *获取焦点 :focus
        *选中状态 ::selection 火狐浏览器为::-moz-selection;



        */
        a:link{color: red;}
        a:visited{color:yellow;}
        input:focus{background-color:blue;}




    </style>
</head>
<body>
    <a href="http://www.baidu.com" target="_blank">访问过的链接</a>
        <br>
    <a href="http://www.baidu1234567.com" target="_blank">没访问过的链接</a>
    <br>
    使用input创建一个文本输入框
    <input type="text">

</body>
</html>

 

Document

访问过的链接
没访问过的链接
使用input创建一个文本输入框

posted @ 2018-04-05 16:37  Karlkaijie  阅读(84)  评论(0)    收藏  举报