:last-child

W3C CSS Snapshot 2026

Parent ရဲ့ နောက်ဆုံး child element ဖြစ်ရင် ရွေးပါတယ်။

ဒီစာမျက်နှာမှာ

ရေးပုံနဲ့ သုံးလို့ရတဲ့ တန်ဖိုးများ

တန်ဖိုး သို့မဟုတ် ရေးပုံအလုပ်လုပ်ပုံ
li:last-childနောက်မှာ တခြား sibling element မရှိတဲ့ li ကို ရွေးပါတယ်။

နမူနာကို စမ်းကြည့်ပါ

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>:last-child</title>
  <style>
li:last-child { color: teal; }
  </style>
</head>
<body>
<ul>
  <li>Check in</li>
  <li>Pick up materials</li>
  <li>Find a seat</li>
  <li>Start the activity</li>
</ul>
</body>
</html>

စမ်းကြည့်ရင် ဘာဖြစ်မလဲ နောက်ဆုံးစာရင်းဝင်တစ်ခုတည်း အရောင်ပြောင်းပါတယ်။

တရားဝင် ကိုးကားချက်များ