超鏈接
a:link
{color: #FF0000}
a:visited
{color: #00FF00}
a:hover
{color: #FF00FF}
a:active
{color: #0000FF}
a:hover 必須被置于 a:link 和 a:visited 之后
a:active 必須被置于 a:hover 之后
:focus
input:focus
{
background-color:yellow;
}
:first-child
<p>These are the necessary steps:</p>
<ul>
<li>Intert Key</li>
<li>Turn key <strong>clockwise</strong></li>
<li>Push accelerator</li>
</ul>
<p>Do <em>not</em> push the brake at the same time as the accelerator.</p>
</div>
p:first-child {font-weight: bold;}
作為某元素第一個(gè)子元素的所有 p 元素設(shè)置為粗體
li:first-child {text-transform:uppercase;}
作為某個(gè)元素(在 HTML 中德澈,這肯定是 ol 或 ul 元素)第一個(gè)子元素的所有 li 元素變成大寫
:lang
:lang(en) > Q { quotes: '\201C' '\201D' '\2018' '\2019'; }
:lang(fr) > Q { quotes: '? ' ' ?'; }
:lang(de) > Q { quotes: '?' '?' '\2039' '\203A'; }
<div lang="fr"><q>This French quote has a <q>nested</q> quote.</q></div>
<div lang="de"><q>This German quote has a <q>nested</q> quote.</q></div>
<div lang="en"><q>This English quote has a <q>nested</q> quote.</q></div>