Txheej txheem cej luam
Cheebtsam thiab cov kev xaiv rau kev tso tawm koj txoj haujlwm Bootstrap, suav nrog cov thawv ntim khoom, lub kaw lus muaj zog, cov khoom siv xov xwm hloov tau yooj yim, thiab cov chav kawm siv hluav taws xob.
Cov thawv ntim khoom yog cov txheej txheem yooj yim tshaj plaws hauv Bootstrap thiab yuav tsum tau siv thaum siv peb lub default grid system . Xaiv los ntawm lub thawv teb, qhov dav dav (lub ntsiab lus nws cov max-width
kev hloov pauv ntawm txhua qhov chaw tawg) lossis dej dav dav (lub ntsiab lus nws 100%
dav txhua lub sijhawm).
Thaum cov thawv tuaj yeem ua zes, feem ntau layouts tsis xav tau lub thawv nested.
Siv .container-fluid
rau lub thawv dav dav, hla tag nrho qhov dav ntawm qhov chaw saib.
Txij li thaum Bootstrap yog tsim los ua mobile ua ntej, peb siv ib tug puv tes ntawm xov xwm queries los tsim kom paub meej breakpoints rau peb layouts thiab interfaces. Cov breakpoints no feem ntau yog raws li qhov tsawg kawg nkaus saib qhov dav dav thiab tso cai rau peb los ntsuas cov ntsiab lus raws li qhov pom qhov hloov pauv.
Bootstrap feem ntau siv cov lus nug hauv qab no - lossis cov ntsiab lus tawg - hauv peb cov ntaub ntawv Sass rau peb qhov kev teeb tsa, kab sib chaws, thiab cov khoom.
Txij li thaum peb sau peb qhov chaw CSS hauv Sass, tag nrho peb cov lus nug xov xwm muaj nyob ntawm Sass mixins:
Peb qee zaus siv cov lus nug xov xwm uas mus rau lwm qhov kev taw qhia (qhov muab lub vijtsam loj lossis me dua ):
Nco ntsoov tias txij li cov browsers tam sim no tsis txhawb ntau cov ntsiab lus nug , peb ua haujlwm nyob ib puag ncig cov kev txwv ntawm min-
thiab max-
ua ntej thiab cov chaw saib nrog qhov dav dav (uas tuaj yeem tshwm sim hauv qee yam ntawm cov khoom siv high-dpi, piv txwv li) los ntawm kev siv cov txiaj ntsig siab dua rau cov kev sib piv no. .
Ib zaug ntxiv, cov lus nug xov xwm no kuj muaj nyob ntawm Sass mixins:
Kuj tseem muaj cov lus nug xov xwm thiab cov mixins rau lub hom phiaj ib ntu ntawm qhov screen loj siv qhov tsawg kawg nkaus thiab qhov siab tshaj plaws breakpoint widths.
Cov lus nug xov xwm no kuj muaj nyob ntawm Sass mixins:
Ib yam li ntawd, cov lus nug xov xwm tuaj yeem nthuav dav ntau qhov dav dav:
Lub Sass mixin rau lub hom phiaj tib lub vijtsam loj yuav yog:
Ob peb Bootstrap Cheebtsam siv z-index
, CSS cov cuab yeej uas pab tswj kev teeb tsa los ntawm kev muab peb axis los npaj cov ntsiab lus. Peb siv lub default z-index scale nyob rau hauv Bootstrap uas yog tsim los kom zoo txheej navigation, tooltips thiab popovers, modals, thiab ntau dua.
Cov txiaj ntsig siab dua no pib ntawm tus lej tsis txaus ntseeg, siab thiab tshwj xeeb txaus kom tsis txhob muaj kev tsis sib haum xeeb. Peb xav tau cov txheej txheem txheej txheem ntawm cov no thoob plaws peb cov txheej txheem - cov lus qhia, popovers, navbars, dropdowns, modals - yog li peb tuaj yeem ua raws li kev coj cwj pwm. Tsis muaj laj thawj peb tsis tuaj yeem siv 100
+ lossis 500
+.
Peb tsis txhawb kom customization ntawm tus kheej qhov tseem ceeb no; Yog tias koj hloov ib qho, koj yuav xav tau hloov lawv txhua tus.
Txhawm rau tswj cov ciam teb sib tshooj hauv cov khoom (piv txwv li, cov nyees khawm thiab cov khoom siv hauv pawg tswv yim), peb siv tus lej qis tus lej z-index
ntawm 1
, 2
, thiab 3
rau lub neej ntawd, hover, thiab lub xeev nquag. Ntawm hover/focus/active, peb nqa ib lub ntsiab rau pem hauv ntej nrog tus nqi siab dua z-index
los qhia lawv ciam teb ntawm cov kwv tij.