attribute နာမည်ဖြင့် select လုပ်ခြင်း
attribute နာမည်ဖြင့် select လုပ်ခြင်းသည် သတ်မှတ်ထားသော tag attribute တစ်ခု ရှိသည့် element တစ်ခုအတွက် style ကို သတ်မှတ်ပေးပါသည်။
ဥပမာ
<input> tag ကို
type attribute ဖြင့်
အသုံးပြုကြည့်ပြီး
အပြာရောင်နောက်ခံကို သတ်မှတ်ပေးကြပါစို့။
<p>
<label>စာသားရိုက်ထည့်ပါ</label>
<input>
</p>
<p>
<label>ဂဏန်းရိုက်ထည့်ပါ</label>
<input type="number">
</p>
input[type] {
background-color: #C2DDFD;
}
:
ဒါလေးတွေလည်း ကြည့်ပါ
-
attribute selector,
သည် attribute တစ်ခု၏ တန်ဖိုးဖြင့် element ကို ရှာဖွေပါသည် -
attribute selector,
သည် attribute တစ်ခု၏ တန်ဖိုးအစဖြင့် element ကို ရှာဖွေပါသည် -
attribute selector,
သည် attribute တစ်ခု၏ တန်ဖိုးအဆုံးဖြင့် element ကို ရှာဖွေပါသည် -
attribute selector,
သည် attribute တစ်ခု၏ တန်ဖိုးအတွင်းရှိ စာသားဖြင့် element ကို ရှာဖွေပါသည် -
attribute selector,
သည် attribute တစ်ခု၏ တန်ဖိုးများထဲမှ တစ်ခုဖြင့် element ကို ရှာဖွေပါသည် -
attribute selector,
သည် attribute တစ်ခု၏ တန်ဖိုးအတွင်းရှိ ဟိုက်ဖန်ဖြင့် element ကို ရှာဖွေပါသည် -
Child selector,
သည် တိုက်ရိုက် ထည့်သွင်းမှုဖြင့် element များကို ရွေးချယ်ရန် ခွင့်ပြုပေးပါသည် -
Contextual selector,
သည် ၎င်း၏ မိဘဖြင့် element တစ်ခုကို ရွေးချယ်ရန် ခွင့်ပြုပေးပါသည် -
Adjacent sibling selector,
သည် ၎င်း၏ အနီးကပ် element ဖြင့် element တစ်ခုကို ရွေးချယ်ရန် ခွင့်ပြုပေးပါသည် -
General sibling selector,
သည် သတ်မှတ်ထားသော element နောက်မှ element များကို ရွေးချယ်ရန် ခွင့်ပြုပေးပါသည် -
Universal selector,
သည် element အားလုံးကို ရွေးချယ်ရန် ခွင့်ပြုပေးပါသည်