:focus-visible
W3C CSS Snapshot 2026
Keyboard နဲ့ ရွှေ့တာမျိုးမှာ focus ရနေတဲ့ နေရာကို ပြသင့်တယ်လို့ browser ဆုံးဖြတ်တဲ့အခါ element ကို ရွေးပါတယ်။
Code စမ်းလို့ရတဲ့ သင်ခန်းစာ ဖွင့်ရန်
ဒီစာမျက်နှာမှာ
ရေးပုံနဲ့ သုံးလို့ရတဲ့ တန်ဖိုးများ
| တန်ဖိုး သို့မဟုတ် ရေးပုံ | အလုပ်လုပ်ပုံ |
|---|---|
button:focus-visible | Keyboard နဲ့ သွားတာမျိုးမှာ browser က focus ပြသင့်တဲ့ ခလုတ်ကို ရွေးပါတယ်။ |
နမူနာကို စမ်းကြည့်ပါ
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>:focus-visible</title>
<style>
button:focus-visible { outline: 3px solid teal; outline-offset: 4px; }
</style>
</head>
<body>
<button type="button">Open schedule</button>
<button type="button" disabled>Unavailable</button>
</body>
</html>
စမ်းကြည့်ရင် ဘာဖြစ်မလဲ Tab နဲ့ Open schedule ဆီသွားရင် outline မြင်ရပါမယ်။