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

CSS ?? ??

CSS ?? ??


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


??

?? ?? ??:

selector:pseudo-element {property:value;}

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

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


: ? ?? ? ?? ??

"? ?? ?" ?? ??? ???? ? ?? ?? ??? ???? ???? ? ?????.

?? ??? ????? "? ?? ?" ?? ??? ???? ?? p ??? ? ?? ??? ? ??? ?????.

          <!DOCTYPE html>
<html>
<head>
    <style>
        p:first-line
        {
            color:#ff0000;
            font-variant:small-caps;
        }
    </style>
</head>

<body>
<p>您可以使用:線偽元素添加特殊效果給第一行文本。</p>
</body>
</html>

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


??:"? ?? ?" ?? ??? ?? ?? ???? ??? ? ????.

??: "? ?? ?" ?? ??? ?? ??? ??? ? ????.

  • ?? ??
  • ?? ??
  • ?? ??
  • ?? ??
  • ?? ??
  • text -??
  • vertical-align
  • text-transform
  • line-height
  • clear

: ? ?? ?? ??

"? ??" ?? ??? ??? ???? ???? ? ?????. ???? ? ??:

?

     <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>php中文網(wǎng)(php.cn)</title> 
<style>
p:first-letter 
{
	color:#ff0000;
	font-size:xx-large;
}
</style>
</head>

<body>
<p>You can use the :first-letter pseudo-element to add a special effect to the first character of a text!</p>
</body>
</html>

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


??: "? ??" ?? ??? ?? ???? ??? ? ????. ??.

??: "? ??" ?? ??? ?? ??? ??? ? ????.

  • ?? ??
  • ?? ??
  • ?? ??
  • ?? ??
  • ?? ??
  • ??? ??
  • text- ??
  • vertical-align ("float"? "none"? ????)
  • text-transform
  • line-height
  • float
  • clear

?? ?? ? CSS ???

pseudo- ??? CSS ???? ??? ? ????. :

p.article:first-letter {color:#ff0000;}

<p class="article">??? ??</p>

The ?? ?? ?? ???? ?? ??? ? ??? ????? ??? ????.


?? ?? ??

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

?? ???? ??? ? ??? ????? ???? ?? ??? xx-large? ???. ? ?? ?? ??? ???? ????? ?? ???? ?????.

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

?

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>php中文網(wǎng)(php.cn)</title> 
<style>
p:first-letter
{
	color:#ff0000;
	font-size:xx-large;
}
p:first-line 
{
	color:#0000ff;
	font-variant:small-caps;
}
</style>
</head>

<body>
<p>You can combine the :first-letter and :first-line pseudo-elements to add a special effect to the first letter and the first line of a text!</p>
</body>
</html>

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


CSS - :before ?? ??

":before" ?? ??? ??? ??? ?? ? ???? ??? ? ????.

?? ???? ? <h1> ?? ?? ???? ?????.

Example

       <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>php中文網(wǎng)(php.cn)</title>
    <style>
        h1:before {content:url(https://img.php.cn/upload/course/000/000/006/5809800b44336872.jpg);}
    </style>
</head>

<body>
<h1>This is a heading</h1>
<p>The :before pseudo-element inserts content before an element.</p>
<h1>This is a heading</h1>
<p><b>注意:</b>僅當(dāng) !DOCTYPE 已經(jīng)聲明 IE8 支持這個內(nèi)容屬性</p>
</body>
</html>

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


CSS - :after pseudo-element

":after" ?? ??? ??? ??? ?? ? ???? ??? ? ????.

?? ????? ? <h1> ?? ?? ???? ?????.

Example

       <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>php中文網(wǎng)(php.cn)</title>
    <style>
        h1:after {content:url(https://img.php.cn/upload/course/000/000/006/5809800b44336872.jpg);}
    </style>
</head>

<body>
<h1>This is a heading</h1>
<p>The :after pseudo-element inserts content after an element.</p>
<h1>This is a heading</h1>
<p><b>注意:</b>僅當(dāng)!DOCTYPE 已經(jīng)聲明 IE8支持這個內(nèi)容屬性.</p>
</body>
</html>

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


?? CSS ?? ???/??

Selector? ?? ??
:linka:link???? ?? ?? ?? ??
:visiteda:visited??? ?? ?? ??
:active a :?? ?? ??? ?????
:hovera:hover?? ?? ???? ?????
:focusinput:focus?? ? ???? ?? ??? ?????
: first-letterp:first-letter?

??? ? ?? ??

:first-linep:first-line?

??? ? ?? ?? ? ?

:first-childp:first-child ???? ?? ??? ? ?? ??? <]p> ??? ?????.
:beforep: beforeInsert ?

??

:afterp:after?

element

?? ??? ??:lang(??)p:lang (it)??? ?????

??



? lang ?? ?
???? ??
||
<!DOCTYPE html> <html> <head> <style> p:first-line { color:#ff0000; font-variant:small-caps; } </style> </head> <body> <p>您可以使用:線偽元素添加特殊效果的第一行文本。</p> </body> </html>