Mandehana any amin'ny votoaty fototra Mandehana any amin'ny docs navigation
Check
in English

Fifandraisana

Kilasy fampiasa izay manova ny fomba ifandraisan'ny mpampiasa amin'ny votoatin'ny tranonkala iray.

Fantenana lahatsoratra

Ovay ny fomba nifidianana ny atiny rehefa mifandray aminy ny mpampiasa.

Ity fehintsoratra ity dia hofantenana tanteraka rehefa kitihin'ny mpampiasa.

Ity andalana ity dia manana fitondran-tena mifantina default.

Ity fehintsoratra ity dia tsy azo fidina rehefa kitihin'ny mpampiasa.

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>

Hetsika fanondro

Bootstrap dia manome .pe-nonesy .pe-autokilasy mba hisorohana na hanampiana singa mifandray.

Tsy azo kitihina ity rohy ity .

Ity rohy ity dia azo kitihina (fihetsika mahazatra izany).

Tsy azo kitihina ity rohy itypointer-events satria lova avy amin'ny ray aman-dreniny ilay fananana. Misy kilasy anefa ity rohype-auto ity ary azo kitihina.

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>

Ny .pe-nonekilasy (sy ny pointer-eventsfananana CSS apetrany) dia manakana ny fifaneraserana amin'ny tondro ( totozy, stylus, fikasihana). Ny rohy sy ny fanaraha-maso miaraka .pe-nonedia, raha ny mahazatra, dia mbola azo ianteherana sy azo atao ho an'ny mpampiasa klavier. Mba hahazoana antoka fa tsy miandany tanteraka izy ireo na dia ho an'ny mpampiasa klavier aza, dia mety mila manampy toetra hafa toy ny tabindex="-1"(mba hisakanana azy ireo tsy hahazo fifantohana amin'ny fitendry) sy aria-disabled="true"(mba hampitana ny zava-misy fa tsy mahomby amin'ny teknolojia fanampiana izy ireo), ary mety hampiasa JavaScript manakana tanteraka azy ireo tsy ho azo atao.

Raha azo atao, ny vahaolana tsotra dia:

  • Ho an'ny fifehezana endrika, ampio ny disabledtoetra HTML.
  • Ho an'ny rohy, esory ny hreftoetra, ka ataovy ho vatofantsika tsy misy ifandraisany na rohy misy toerana.

Sass

Utilities API

Ny fitaovam-pifandraisana dia nambara ao amin'ny API fampiasantsika amin'ny scss/_utilities.scss. Ianaro ny fomba fampiasana ny utility API.

    "user-select": (
      property: user-select,
      values: all auto none
    ),
    "pointer-events": (
      property: pointer-events,
      class: pe,
      values: none auto,
    ),