in English

Iispinners

Bonisa imeko yokulayisha yecandelo okanye iphepha eline-Bootstrap spinners, eyakhelwe ngokupheleleyo ngeHTML, CSS, kwaye akukho JavaScript.

Malunga

I-Bootstrap "spinners" ingasetyenziselwa ukubonisa imeko yokulayisha kwiiprojekthi zakho. Zakhelwe kuphela nge-HTML kunye neCSS, okuthetha ukuba awudingi iJavaScript ukuyidala. Uyakufuna, nangona kunjalo, iJavaScript yesiko ukuguqula ukubonakala kwayo. Inkangeleko yabo, ulungelelwaniso, kunye nobungakanani bunokwenziwa ngokulula kunye neeklasi zethu eziluncedo ezimangalisayo.

Ngeenjongo zokufikeleleka, umlayishi ngamnye apha uquka role="status"kunye nendlwane <span class="sr-only">Loading...</span>.

Isiphumo soopopayi seli candelo sixhomekeke prefers-reduced-motionkumbuzo wemidiya. Jonga icandelo leentshukumo ezincitshisiweyo kuxwebhu lwethu lofikelelo .

I-Border spinner

Sebenzisa i-spinners yomda kwisalathisi esilula sokulayisha.

Iyalayisha...
<div class="spinner-border" role="status">
  <span class="sr-only">Loading...</span>
</div>

Imibala

Umda we spinner usetyenziselwa currentColorwona border-color, oku kuthetha ukuba ungenza ngokusesikweni umbala ngezinto eziluncedo zombala wokubhaliweyo . Ungasebenzisa nayiphi na into yethu yombala wokubhaliweyo kwi-spinner eqhelekileyo.

Iyalayisha...
Iyalayisha...
Iyalayisha...
Iyalayisha...
Iyalayisha...
Iyalayisha...
Iyalayisha...
Iyalayisha...
<div class="spinner-border text-primary" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-border text-secondary" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-border text-success" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-border text-danger" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-border text-warning" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-border text-info" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-border text-light" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-border text-dark" role="status">
  <span class="sr-only">Loading...</span>
</div>
Kutheni ungasebenzisi border-colorizinto eziluncedo? Umda ngamnye wesipinari uchaza transparentumda ubuncinane wecala elinye, ngoko ke .border-{color}izinto eziluncedo ziyakugqitha oko.

Ukukhula kwe-spinner

Ukuba awunqweneli i-spinner yomda, tshintshela kwi-spinner yokukhula. Ngelixa ingajiki ngokobuchwephesha, iyakhula ngokuphindaphindiweyo!

Iyalayisha...
<div class="spinner-grow" role="status">
  <span class="sr-only">Loading...</span>
</div>

Kwakhona, le spinner yakhiwe nge currentColor, ngoko ke unokutshintsha ngokulula inkangeleko yayo ngezixhobo zombala wokubhaliweyo . Nantsi iblue, kunye nezinto ezahlukeneyo ezixhaswayo.

Iyalayisha...
Iyalayisha...
Iyalayisha...
Iyalayisha...
Iyalayisha...
Iyalayisha...
Iyalayisha...
Iyalayisha...
<div class="spinner-grow text-primary" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-grow text-secondary" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-grow text-success" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-grow text-danger" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-grow text-warning" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-grow text-info" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-grow text-light" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-grow text-dark" role="status">
  <span class="sr-only">Loading...</span>
</div>

Ulungelelwaniso

Iispinners eBootstrap zakhiwe nge rems, currentColor, kunye display: inline-flex. Oku kuthetha ukuba zinokuhlengahlengiswa ngokulula, zifakwe umbala kwakhona, kwaye zilungelelaniswe ngokukhawuleza.

Umda

Sebenzisa izinto eziluncedo zomda njengokwenza .m-5izithuba ezilula.

Iyalayisha...
<div class="spinner-border m-5" role="status">
  <span class="sr-only">Loading...</span>
</div>

Ukubekwa

Sebenzisa izinto eziluncedo ze-flexbox , izinto ezidadayo , okanye izinto zolungelelwaniso lombhalo ukubeka izijikelezi-ndlela kanye apho uzifuna khona kuyo nayiphi na imeko.

Flex

Iyalayisha...
<div class="d-flex justify-content-center">
  <div class="spinner-border" role="status">
    <span class="sr-only">Loading...</span>
  </div>
</div>
Iyalayisha...
<div class="d-flex align-items-center">
  <strong>Loading...</strong>
  <div class="spinner-border ml-auto" role="status" aria-hidden="true"></div>
</div>

Izinto ezidadayo

Iyalayisha...
<div class="clearfix">
  <div class="spinner-border float-right" role="status">
    <span class="sr-only">Loading...</span>
  </div>
</div>

Ukulungelelanisa okubhaliweyo

Iyalayisha...
<div class="text-center">
  <div class="spinner-border" role="status">
    <span class="sr-only">Loading...</span>
  </div>
</div>

Ubungakanani

Yongeza .spinner-border-smkwaye .spinner-grow-smwenze i-spinner encinci enokuthi isetyenziswe ngokukhawuleza phakathi kwamanye amacandelo.

Iyalayisha...
Iyalayisha...
<div class="spinner-border spinner-border-sm" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-grow spinner-grow-sm" role="status">
  <span class="sr-only">Loading...</span>
</div>

Okanye, sebenzisa i-CSS yesiko okanye izitayile ezingaphakathi ukuguqula imilinganiselo njengoko kufuneka.

Iyalayisha...
Iyalayisha...
<div class="spinner-border" style="width: 3rem; height: 3rem;" role="status">
  <span class="sr-only">Loading...</span>
</div>
<div class="spinner-grow" style="width: 3rem; height: 3rem;" role="status">
  <span class="sr-only">Loading...</span>
</div>

Amaqhosha

Sebenzisa i-spinners ngaphakathi kwamaqhosha ukubonisa intshukumo ngoku okanye eyenzekayo. Ungatshintsha kwakhona umbhalo ngaphandle kwesipina kwaye usebenzise umbhalo weqhosha njengoko kufuneka.

<button class="btn btn-primary" type="button" disabled>
  <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
  <span class="sr-only">Loading...</span>
</button>
<button class="btn btn-primary" type="button" disabled>
  <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
  Loading...
</button>
<button class="btn btn-primary" type="button" disabled>
  <span class="spinner-grow spinner-grow-sm" role="status" aria-hidden="true"></span>
  <span class="sr-only">Loading...</span>
</button>
<button class="btn btn-primary" type="button" disabled>
  <span class="spinner-grow spinner-grow-sm" role="status" aria-hidden="true"></span>
  Loading...
</button>