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