:focus-visible

W3C CSS Snapshot 2026

Keyboard နဲ့ ရွှေ့တာမျိုးမှာ focus ရနေတဲ့ နေရာကို ပြသင့်တယ်လို့ browser ဆုံးဖြတ်တဲ့အခါ element ကို ရွေးပါတယ်။

ဒီစာမျက်နှာမှာ

ရေးပုံနဲ့ သုံးလို့ရတဲ့ တန်ဖိုးများ

တန်ဖိုး သို့မဟုတ် ရေးပုံအလုပ်လုပ်ပုံ
button:focus-visibleKeyboard နဲ့ သွားတာမျိုးမှာ 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 မြင်ရပါမယ်။

တရားဝင် ကိုးကားချက်များ