Kudyidzana
Utility makirasi anoshandura maitiro evashandisi nezviri mukati mewebhusaiti.
Kusarudzwa kwemavara
Shandura nzira iyo zvinyorwa zvinosarudzwa kana mushandisi achipindirana nazvo.
Iyi ndima ichasarudzwa zvachose kana yadzvanywa nemushandisi.
Iyi ndima ine default select maitiro.
Iyi ndima haigone kusarudzwa kana ikadzvanywa nemushandisi.
<p class="user-select-all">This paragraph will be entirely selected when clicked by the user.</p>
<p class="user-select-auto">This paragraph has default select behavior.</p>
<p class="user-select-none">This paragraph will not be selectable when clicked by the user.</p>
Pointer zviitiko
Bootstrap inopa .pe-none
uye .pe-auto
makirasi ekudzivirira kana kuwedzera chinhu chekudyidzana.
Link iyi haigone kubatika.
Iyi link inogona kudzvanywa (iyi ndiyo default maitiro).
Link iyi haigone kubatika nekuti pointer-events
midziyo yakagarwa nhaka kubva kumubereki wayo. Nekudaro, iyi link ine pe-auto
kirasi uye inogona kudzvanywa.
<p><a href="#" class="pe-none" tabindex="-1" aria-disabled="true">This link</a> can not be clicked.</p>
<p><a href="#" class="pe-auto">This link</a> can be clicked (this is default behavior).</p>
<p class="pe-none"><a href="#" tabindex="-1" aria-disabled="true">This link</a> can not be clicked because the <code>pointer-events</code> property is inherited from its parent. However, <a href="#" class="pe-auto">this link</a> has a <code>pe-auto</code> class and can be clicked.</p>
.pe-none
(uye
pointer-events
CSS pfuma yaanoisa) inongodzivirira kupindirana neinongedza (mbeva, penzura, kubata). Zvinongedzo
.pe-none
uye zvidzoreso zvine, nekukasira, zvichiri kutarisika uye zvinogoneka kune vashandisi vekhibhodi. Kuve nechokwadi chekuti haana kurerekera zvachose kunyangwe kune vashandisi vekhibhodi, ungangoda kuwedzera humwe hunhu hwakadai se
tabindex="-1"
(kuvadzivirira kubva pakugashira keyboard) uye
aria-disabled="true"
(kuburitsa chokwadi chekuti vakaremara zvinobudirira kuhunyanzvi hwekubatsira), uye pamwe shandisa JavaScript ku. kuvadzivisa zvachose kuti vasaite. Kuti utore fomu, funga kushandisa iyo
disabled
HTML hunhu panzvimbo.
Sass
Purogiramu inonzi Utilities
Zvekudyidzana zvinoshandiswa zvinoziviswa mune yedu zvishandiso API mu scss/_utilities.scss
. Dzidza mashandisiro ezvishandiso API.
"user-select": (
property: user-select,
values: all auto none
),
"pointer-events": (
property: pointer-events,
class: pe,
values: none auto,
),