Svetuka kune chikuru content Svetuka kuenda kudocs navigation
Check
in English

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.

html
<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-noneuye .pe-automakirasi ekudzivirira kana kuwedzera chinhu chekudyidzana.

Link iyi haigone kubatika.

Iyi link inogona kudzvanywa (iyi ndiyo default maitiro).

Link iyi haigone kubatika nekuti pointer-eventsmidziyo yakagarwa nhaka kubva kumubereki wayo. Nekudaro, iyi link ine pe-autokirasi uye inogona kudzvanywa.

html
<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>

Kirasi .pe-none(uye pointer-eventsCSS pfuma yaanoisa) inongodzivirira kupindirana neinongedza (mbeva, penzura, kubata). Zvinongedzo .pe-noneuye 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.

Kana zvichibvira, mhinduro iri nyore ndeiyi:

  • Kuti utore fomu, wedzera iyo disabledHTML hunhu.
  • Kuti uwane zvinongedzo, bvisa hrefhunhu, uchiita kuti ive isiri-inopindirana anchor kana placeholder link.

Sass

Purogiramu inonzi Utilities

Zvekudyidzana zvinoshandiswa zvinoziviswa mune zvedu zvekushandisa 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,
    ),