Child Combinator (>)
W3C CSS Snapshot 2026
ရှေ့မှာ ရေးထားတဲ့ selector နဲ့ ကိုက်တဲ့ element ရဲ့ တိုက်ရိုက် child တွေကို ရွေးပါတယ်။
Code စမ်းလို့ရတဲ့ သင်ခန်းစာ ဖွင့်ရန်
ဒီစာမျက်နှာမှာ
ရေးပုံနဲ့ သုံးလို့ရတဲ့ တန်ဖိုးများ
| တန်ဖိုး သို့မဟုတ် ရေးပုံ | အလုပ်လုပ်ပုံ |
|---|---|
section > p | တိုက်ရိုက် parent က section ဖြစ်တဲ့ <p> ကို ရွေးပါတယ်။ |
နမူနာကို စမ်းကြည့်ပါ
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Child Combinator (>)</title>
<style>
section > p { color: teal; }
</style>
</head>
<body>
<section>
<p>Direct child</p>
<div><p>Nested paragraph</p></div>
</section>
<p>Outside the section</p>
</body>
</html>
စမ်းကြည့်ရင် ဘာဖြစ်မလဲ ပထမစာပိုဒ်ပဲ စိမ်းပြာရောင် ဖြစ်ပါတယ်။ အတွင်းထပ်ဝင်ထားတဲ့ စာပိုဒ်ရဲ့ တိုက်ရိုက် parent က div ပါ။