亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

CSS ?? ???

CSS ?? ???

CSS ?? ???? ???? ? ?? ?? ??? ???? ? ?????.


Syntax

?? ??? ??:

selector:pseudo-class {property:value;}

CSS ???? ?? ???? ??? ? ????.

selector.class:pseudo-class {property:value;}


anchor pseudo-class

CSS? ???? ??????? ??? ?? ??? ??? ???? ??? ? ????. CSS ???? ???

??

      <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>php中文網(wǎng)(php.cn)</title>
    <style>
        a:link {color:#FF0000;}    /* 未訪問(wèn)的鏈接 */
        a:visited {color:#00FF00;} /* 已瀏覽過(guò)的鏈接 */
        a:hover {color:#FF00FF;}   /* 鼠標(biāo)劃過(guò)的鏈接 */
        a:active {color:#0000FF;}  /* 已選中的鏈接 */
    </style>
</head>

<body>
<p><b><a href="" target="_blank">這是一個(gè)鏈接</a></b></p>
<p><b>注意:</b> a:hover 必須在 a:link 和 a:visited 之后,需要嚴(yán)格按順序才能看到效果。</p>
<p><b>注意:</b> a:active 必須在 a:hover 之后。</p>
</body>
</html>

Note? ?? ?? ?????. a:hover? a:link? a:visited ?? ?? ??, ??? ??? ??? ??? ??? ???. ??.

??: a:active? a:hover ?? ?? ???.

??: ?? ??? ??? ????? ???? ????.

????? ???? ??? ???


?? ??? ? CSS ???

?? ???? CSS ???? ?? ??? ? ????:

a.red:visited {color: #FF0000;}

< ;a ??? ="red" href="css-syntax.html ">CSS ??</a>

? ??? ??? ????? ????? ?????.


Instance

Use :focus

  <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>php中文網(wǎng)(php.cn)</title>
    <style>
        input:focus
        {
            background-color:yellow;
        }
    </style>
</head>

<body>
<form action="" method="get">
    姓名: <input type="text" name="fname" /><br>
    留言: <input type="text" name="content" /><br>
    <input type="submit" value="Submit" />
</form>


</body>
</html>

????? ???? ??? ???


?? CSS ?? ???/??

??? ?? ??? ???????. ? ? ?? ?? :before:after??p:lang(it)
SelectorExample?? ??
:checkedinput:checked??? ?? ?? ?? ??
:disabledinput:disabled ????? ?? ?? ?? ??
:emptyp:empty?? ??? ?? ?? p ?? ??
:enabledinput:enabled???? ?? ?? ?? ??
:first-of- type p:first-of-typep ??? ? ?? ??? ? ?? p ?? ??? ?????
:in-rangeinput:in-range??? ?? ?? ??? ?????. ?
: ???? ?? ??: ???? ?? ???? ?? ?? ?? ??
: ??? ?? p: ??? ?? ?? p ??? ??? ?? ?? ??
: ??? ?? p:last-of-type?? ??? ? p ??? ??? p ??? ?????
:not(selector):not(p)p
:nth-child(n)p:nth-child(2)?? p ?? ? ? ?? ?? ??? ?????
:nth-last-child(n) p:nth- last-child(2)?? p ?? ? ? ?? ??? ?? ?? ??
:nth-last-of-type(n)p:nth-last-of-type( 2)Select ????? ? ?? ?? ??? p
:nth-of-type(n)p:nth-of-type(2)? ?? p ?? ?? p
:only-of-typep:only-of-typep
:only-childp :only-child??? ???? ?? p ??? ?????. ??? ?? ???
:???input:???"??" ??? ?? ??? ?????
:out-of-rangeinput :out-of-range??? ???? ?? ??? ?????. ??? ??? ??? ?
:?? ??input:?? ???? ?? ??? ?? ?? ?? ??
:??-?? input:??-??Select ?? ?? ??? ?? ?? ??
:requiredinput:required"??" ???? ??? ?? ??? ?????
:rootroot document
: target #news: target ?? ???? #news ??? ?????(?? ??? ??? URL? ?????)
:validinput:valid??? ?? ?? ?? ?? ?? ??
:linka:link???? ?? ?? ?? ??
:visiteda:visited ?? ?? ??? ??
:activea:active?? ?? ??
:hovera:hover?? ?? ???? ????.
:focus ??:focus ?? ? ???? ? ?? ??
:first-letterp:first-letter? <p> ??? ? ?? ??
:first-line p:first -line? <p> ??? ? ?? ?? ?????.
:first-childp:first-child???? ?? ?? <]p>? ? ?? ?? ??? ?????.
p:before? <p> ?? ?? ???? ?????
p:after?? ? <p> ?? ?? ???? ?????. ()
<p> ??


???? ??
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <style> input:focus { background-color:yellow; } </style> </head> <body> <form action="" method="get"> 姓名: <input type="text" name="fname" /><br> 留言: <input type="text" name="content" /><br> <input type="submit" value="Submit" /> </form> </body> </html>