Column Combinator (||)
W3C CSS Snapshot 2026
စမ်းသပ်ဆဲ column combinator က table cell တွေကို သက်ဆိုင်ရာ column ကြည့်ပြီး ရွေးပါတယ်။ အသုံးမပြုခင် browser ပံ့ပိုးမှုကို စစ်ပါ။
Code စမ်းလို့ရတဲ့ သင်ခန်းစာ ဖွင့်ရန်
ဒီစာမျက်နှာမှာ
ရေးပုံနဲ့ သုံးလို့ရတဲ့ တန်ဖိုးများ
| တန်ဖိုး သို့မဟုတ် ရေးပုံ | အလုပ်လုပ်ပုံ |
|---|---|
col.selected || td | Browser က ပံ့ပိုးတဲ့အခါ selected class ပါတဲ့ column ထဲက cell တွေကို ရွေးပါတယ်။ |
နမူနာကို စမ်းကြည့်ပါ
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Column Combinator (||)</title>
<style>
col.selected || td { background: #def5f5; }
</style>
</head>
<body>
<table><colgroup><col class="selected"><col></colgroup><tbody><tr><td>Room 2</td><td>9 a.m.</td></tr></tbody></table>
</body>
</html>
စမ်းကြည့်ရင် ဘာဖြစ်မလဲ ပံ့ပိုးတဲ့ browser က Room 2 မှာ highlight ပြပါတယ်။ မပံ့ပိုးတဲ့ browser က rule ကို ကျော်ပြီး table ကို ပုံမှန်ပြပါတယ်။