Imikoranire
Ibyiciro byingirakamaro bihindura uburyo abakoresha bakorana nibiri kurubuga.
Guhitamo inyandiko
Hindura uburyo ibikubiyemo byatoranijwe mugihe umukoresha akorana nayo.
Iki gika kizatoranywa rwose iyo ukanze numukoresha.
Iki gika gifite imyitwarire idahwitse.
Iki gika ntigishobora gutoranywa mugihe ukanze kumukoresha.
<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>
Ibyerekana
Bootstrap itanga .pe-none
n'amasomo .pe-auto
yo gukumira cyangwa kongeramo ibintu.
Ihuza ntirishobora gukanda.
Ihuza rirashobora gukanda (iyi niyo myitwarire isanzwe).
Ihuza ntirishobora gukanda kuko pointer-events
umutungo warazwe nababyeyi. Ariko, iyi link ifite pe-auto
icyiciro kandi irashobora gukanda.
<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>
Urwego .pe-none
( pointer-events
n'umutungo wa CSS rushyiraho) rukumira gusa imikoranire hamwe nigitekerezo (imbeba, stylus, gukoraho). Ihuza nubugenzuzi hamwe .pe-none
, nibisanzwe, biracyibandwaho kandi birakoreshwa kubakoresha clavier. Kugirango umenye neza ko batabogamye rwose no kubakoresha clavier, urashobora gukenera kongeramo ibindi biranga nka tabindex="-1"
(kubabuza kwakira intumbero ya clavier) no aria-disabled="true"
(kwerekana ukuri ko bamugaye neza muburyo bwikoranabuhanga bufasha), kandi birashoboka gukoresha JavaScript kuri ubabuze rwose gukora.
Niba bishoboka, igisubizo cyoroshye ni:
- Kugenzura ifishi,
disabled
ongeramo ikiranga HTML.
- Kubihuza, kura
href
ikiranga, ubigire imiyoboro idahwitse cyangwa ihuza umwanya.
Sass
Ibikorwa API
Ibikorwa byimikoranire byatangajwe mubikorwa byacu API muri scss/_utilities.scss
. Wige gukoresha ibikoresho API.
"user-select": (
property: user-select,
values: all auto none
),
"pointer-events": (
property: pointer-events,
class: pe,
values: none auto,
),