Hla mus rau cov ntsiab lus tseem ceeb Hla mus rau docs navigation
Check

Toggle floats ntawm txhua lub ntsiab lus, hla txhua qhov chaw tawg, siv peb cov khoom siv float teb.

Ntawm nplooj ntawv no

Txheej txheem cej luam

Cov chav kawm siv hluav taws xob no ntab ib qho khoom mus rau sab laug lossis sab xis, lossis lov tes taw ntab, raws li qhov loj ntawm qhov chaw saib tam sim no siv CSS floatcov cuab yeej . !importantsuav nrog kom tsis txhob muaj teeb meem tshwj xeeb. Cov no siv tib qhov chaw saib qhov chaw nres nkoj raws li peb cov kab sib chaws. Thov nco ntsoov tias float utilities tsis cuam tshuam rau cov khoom flex.

Float pib ntawm txhua qhov loj ntawm qhov chaw saib

Float kawg ntawm txhua qhov loj ntawm qhov chaw saib

Tsis txhob ntab ntawm txhua qhov chaw saib qhov loj me
html
<div class="float-start">Float start on all viewport sizes</div><br>
<div class="float-end">Float end on all viewport sizes</div><br>
<div class="float-none">Don't float on all viewport sizes</div>

Teb

Teb variations kuj muaj nyob rau txhua floattus nqi.

Float pib ntawm viewports loj SM (me) los yog dav dua

Float pib ntawm qhov chaw saib qhov loj MD (nruab nrab) lossis dav dua

Float pib ntawm viewports loj LG (loj) lossis dav dua

Float pib ntawm viewports loj XL (ntxiv-loj) lossis dav dua

html
<div class="float-sm-start">Float start on viewports sized SM (small) or wider</div><br>
<div class="float-md-start">Float start on viewports sized MD (medium) or wider</div><br>
<div class="float-lg-start">Float start on viewports sized LG (large) or wider</div><br>
<div class="float-xl-start">Float start on viewports sized XL (extra-large) or wider</div><br>

Nov yog tag nrho cov chav kawm txhawb nqa:

  • .float-start
  • .float-end
  • .float-none
  • .float-sm-start
  • .float-sm-end
  • .float-sm-none
  • .float-md-start
  • .float-md-end
  • .float-md-none
  • .float-lg-start
  • .float-lg-end
  • .float-lg-none
  • .float-xl-start
  • .float-xl-end
  • .float-xl-none
  • .float-xxl-start
  • .float-xxl-end
  • .float-xxl-none

Sass

Utilities API

Float utilities tau tshaj tawm hauv peb cov khoom siv hluav taws xob API hauv scss/_utilities.scss. Kawm paub siv cov khoom siv hluav taws xob API li cas.

    "float": (
      responsive: true,
      property: float,
      values: (
        start: left,
        end: right,
        none: none,
      )
    ),