:last-child
Özet
:last-child
CSS pseudo-class bir grup çocuğun sonuncusunu temsil eder.
Kullanım Notu: İlk tanımda belirtildiği üzere seçilen elemanın atası olması gerekiyordu. CSS4'le beraber artık gerekmiyor.
Yazım Şekli
:last-child
Örnek
HTML İçerik
<ul>
<li>Bu kısım yeşermedi</li>
<li>Bu da yeşermedi.</li>
<li>Burası yeşerdi :)</li>
</ul>
CSS İçerik
li:last-child {
background-color: green;
}
Detaylar
Detay | Durum | Yorum |
---|---|---|
Selectors Level 4 The definition of ':last-child' in that specification. |
Working Draft | Eşleşen elemanların atası olması zorunlu değil. |
Selectors Level 3 The definition of ':last-child' in that specification. |
Recommendation | İlk tanımlama. |
Tarayıcı Uyumluluğu
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help! (en-US)
Özellik | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Temel Seviyede Destek | 1.0 | (Yes) | 1.0 (1.7 or earlier) | 9.0 | 9.5 | 3.2 |
Ata zorunlu değil | 57 | ? | ? | ? | 44 | ? |
Özellik | Android Webview | Chrome for Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|
Temel Seviyede Destek | (Yes) | (Yes) | (Yes) | 1.0 (1) | 9.0 | 10 | 3.2 |
Ata zorunlu değil | 57 | 57 | ? | ? | ? | 44 | ? |