:is()
W3C CSS Snapshot 2026
စာရင်းထဲက selector တစ်ခုခုနဲ့ ကိုက်ရင် ရွေးပါတယ်။ အားအကောင်းဆုံး argument ရဲ့ specificity ကို ယူပါတယ်။
Code စမ်းလို့ရတဲ့ သင်ခန်းစာ ဖွင့်ရန်
ဒီစာမျက်နှာမှာ
ရေးပုံနဲ့ သုံးလို့ရတဲ့ တန်ဖိုးများ
| တန်ဖိုး သို့မဟုတ် ရေးပုံ | အလုပ်လုပ်ပုံ |
|---|---|
section :is(h2, p) | Section အတွင်းက <h2> နဲ့ <p> ကို ရွေးပါတယ်။ |
နမူနာကို စမ်းကြည့်ပါ
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>:is()</title>
<style>
section :is(h2, p) { color: teal; }
</style>
</head>
<body>
<section>
<h2>Workshop</h2>
<p>Registration opens Monday.</p>
<hr>
<p>Bring a notebook.</p>
</section>
<p>Outside the section.</p>
</body>
</html>
စမ်းကြည့်ရင် ဘာဖြစ်မလဲ Section ထဲက ခေါင်းစဉ်နဲ့ စာပိုဒ်နှစ်ခုလုံး ပြောင်းပါမယ်။