Selector List (,)
W3C CSS Snapshot 2026
Selector အသီးသီးကို comma နဲ့ ခွဲရေးရင် တစ်ခုခုနဲ့ ကိုက်တဲ့ element အားလုံးမှာ rule တစ်ခုတည်း သုံးနိုင်ပါတယ်။
Code စမ်းလို့ရတဲ့ သင်ခန်းစာ ဖွင့်ရန်
ဒီစာမျက်နှာမှာ
ရေးပုံနဲ့ သုံးလို့ရတဲ့ တန်ဖိုးများ
| တန်ဖိုး သို့မဟုတ် ရေးပုံ | အလုပ်လုပ်ပုံ |
|---|---|
h2, .notice | <h2> တွေနဲ့ notice class ပါတဲ့ element အားလုံးကို ရွေးပါတယ်။ |
h2.notice | notice class ပါတဲ့ <h2> ကိုပဲ ရွေးပါတယ်။ |
နမူနာကို စမ်းကြည့်ပါ
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Selector List (,)</title>
<style>
h2, .notice { color: teal; }
</style>
</head>
<body>
<p class="notice">Registration opens Monday.</p>
<p id="location">Meet in Room 2.</p>
<h2>Workshop</h2>
</body>
</html>
စမ်းကြည့်ရင် ဘာဖြစ်မလဲ ခေါင်းစဉ်နဲ့ notice စာပိုဒ် အရောင်ပြောင်းပါမယ်။ Comma ဖြုတ်ပြီး ကွာခြားချက်ကို ကြည့်ပါ။