::before
W3C CSS Snapshot 2026
Element ရဲ့ အကြောင်းအရာအစမှာ အလှဆင်စာသား ဒါမှမဟုတ် အမှတ်အသား ထည့်ပေးပါတယ်။
Code စမ်းလို့ရတဲ့ သင်ခန်းစာ ဖွင့်ရန်
ဒီစာမျက်နှာမှာ
ရေးပုံနဲ့ သုံးလို့ရတဲ့ တန်ဖိုးများ
| တန်ဖိုး သို့မဟုတ် ရေးပုံ | အလုပ်လုပ်ပုံ |
|---|---|
.notice::before | Pseudo-element ပေါ်ဖို့ content ရေးပါ။ မရှိမဖြစ် စာသားတွေကို HTML ထဲမှာ ထည့်ပါ။ |
နမူနာကို စမ်းကြည့်ပါ
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>::before</title>
<style>
.notice::before { content: "◆ "; 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 စာသားရှေ့မှာ စိမ်းပြာရောင် စိန်ပုံအမှတ် ပေါ်ပါမယ်။