mozilla

Revision 41220 of :first-child

  • Revision slug: CSS/:first-child
  • Revision title: :first-child
  • Revision id: 41220
  • Created:
  • Creator: Nickolay
  • Is current revision? No
  • Comment [[Category:NeedsContent]]

Revision Content

Selects the first element of a selected group.

Ex:
ul li:first-child{color: green}

<ul>
<li>one</li>
<li>two</li>
</ul>

Revision Source

<p>Selects the first element of a selected group. 
</p><p>Ex:<br>
ul li:first-child{color: green}
</p><p>&lt;ul&gt;<br>
&lt;li&gt;<span style="color: green">one</span>&lt;/li&gt;<br>
&lt;li&gt;two&lt;/li&gt;<br>
&lt;/ul&gt;
</p>
Revert to this revision