Attribute Value ၏ အဆုံးသတ်ဖြင့် ရွေးချယ်သည့် Selector
Attribute Value ၏ အဆုံးသတ်ဖြင့် ရွေးချယ်သည့် Selector သည် tag တစ်ခု၏ attribute တန်ဖိုး သတ်မှတ်ထားသော စာသားဖြင့် အဆုံးသတ်သွားသော element ကို style သတ်မှတ်ရန် အသုံးပြုပါသည်။
ဥပမာ
a tag ကို ကြည့်ရအောင်၊
၎င်း၏ href attribute တန်ဖိုးသည်
.html ဖြင့် အဆုံးသတ်သွားပါက
အနီရောင်သို့ ပြောင်းလဲပေးမည်။
<a href="file.html">link1</a>
<a href="https://code.mu">link2</a>
a[href$=".html"] {
color: red;
}
:
ဆက်စပ်ကြည့်ရှုရန်
-
Attribute selector,
attribute ၏ အမည်ဖြင့် element ကို ရှာဖွေသည် -
Attribute selector,
attribute တန်ဖိုးဖြင့် element ကို ရှာဖွေသည် -
Attribute selector,
attribute တန်ဖိုး၏ အစဖြင့် element ကို ရှာဖွေသည် -
Attribute selector,
attribute တန်ဖိုးအတွင်းရှိ စာသားဖြင့် element ကို ရှာဖွေသည် -
Attribute selector,
attribute တန်ဖိုးများထဲမှ တစ်ခုဖြင့် element ကို ရှာဖွေသည် -
Attribute selector,
attribute တန်ဖိုးအတွင်းရှိ hyphen ဖြင့် element ကို ရှာဖွေသည် -
သားသမီး selector,
တိုက်ရိုက်အဆင့်ဆင့် ထည့်သွင်းမှုအရ element များကို ရွေးချယ်ခွင့်ပြုသည် -
အကြောင်းအရာ selector,
element ၏ မိဘအရင်းအမြစ်အရ ရွေးချယ်ခွင့်ပြုသည် -
အနီးကပ် selector,
element ၏ အနီးကပ်ဆုံး အိမ်နီးချင်းအရ ရွေးချယ်ခွင့်ပြုသည် -
ဆွေမျိုးစု selector,
သတ်မှတ်ထားသော element ပြီးနောက်ရှိ element များကို ရွေးချယ်ခွင့်ပြုသည် -
အထွေထွေ selector,
element အားလုံးကို ရွေးချယ်ခွင့်ပြုသည်