Taw qhia
Pib nrog Bootstrap, lub ntiaj teb nrov tshaj plaws lub moj khaum rau lub tsev teb, mobile-thawj qhov chaw, nrog jsDelivr thiab ib tug template pib nplooj ntawv.
Nrhiav kom nrawm ntxiv Bootstrap rau koj qhov project? Siv jsDelivr, muab pub dawb los ntawm cov neeg ntawm jsDelivr. Siv tus thawj tswj pob lossis xav tau rub tawm cov ntaub ntawv los? Mus rau nplooj ntawv downloads.
Luam-muab cov stylesheet <link>
rau hauv koj <head>
ua ntej tag nrho lwm cov stylesheets thauj peb CSS.
Ntau ntawm peb cov khoom yuav tsum tau siv JavaScript los ua haujlwm. Tshwj xeeb, lawv xav tau jQuery , Popper.js , thiab peb tus kheej JavaScript plugins. Muab cov nram qab no <script>
nyob ze rau qhov kawg ntawm koj nplooj ntawv, txoj cai ua ntej kaw </body>
tag, kom pab tau lawv. jQuery yuav tsum tuaj ua ntej, tom qab ntawd Popper.js, thiab tom qab ntawd peb JavaScript plugins.
Peb siv jQuery's slim tsim , tab sis tag nrho version kuj tau txais kev txhawb nqa.
Xav paub tias cov khoom twg qhia meej yuav tsum tau jQuery, peb JS, thiab Popper.js? Nyem qhov qhia cov khoom txuas hauv qab no. Yog tias koj tsis paub meej txog cov qauv nplooj ntawv dav dav, nyeem ntawv rau ib qho piv txwv nplooj ntawv template.
Qhia cov khoom uas xav tau JavaScript
- Kev ceeb toom rau kev tso tseg
- Khawm rau toggling xeev thiab checkbox / xov tooj cua functionality
- Carousel rau txhua tus cwj pwm swb, tswj, thiab ntsuas
- Kaw rau toggling pom cov ntsiab lus
- Dropdowns rau displaying thiab positioning (tseem yuav tsum tau Popper.js )
- Modals rau displaying, positioning, thiab scroll cwj pwm
- Navbar rau txuas ntxiv peb Collapse plugin los siv tus cwj pwm teb
- Tooltips thiab popovers rau displaying thiab positioning (kuj yuav tsum tau Popper.js )
- Scrollspy rau scroll cwj pwm thiab navigation hloov tshiab
Nco ntsoov kom koj cov nplooj ntawv teeb tsa nrog cov qauv tsim tshiab thiab kev tsim kho tshiab. Qhov ntawd txhais tau hais tias siv HTML5 doctype thiab suav nrog qhov pom qhov pom meta tag rau kev coj tus cwj pwm zoo. Muab tag nrho ua ke thiab koj cov nplooj ntawv yuav tsum zoo li no:
Qhov ntawd yog txhua yam koj xav tau rau tag nrho cov nplooj ntawv xav tau. Mus saib cov Layout docs lossis peb cov piv txwv tseem ceeb los pib tso tawm koj lub vev xaib cov ntsiab lus thiab cov khoom siv.
Bootstrap ntiav ib tug puv tes ntawm lub ntiaj teb no tseem ceeb qauv thiab chaw uas koj yuav tsum tau paub txog thaum siv nws, tag nrho cov uas yuav luag tsuas yog npaj rau lub normalization ntawm cross browser style. Cia peb dhia dej.
Bootstrap xav kom siv HTML5 doctype. Yog tsis muaj nws, koj yuav pom qee qhov kev lom zem tsis tiav, tab sis suav nrog nws yuav tsum tsis txhob ua rau muaj kev ntxhov siab ntau.
Bootstrap yog tsim mobile ua ntej , lub tswv yim nyob rau hauv uas peb optimize code rau mobile pab kiag li lawm ua ntej thiab ces scale up Cheebtsam raws li tsim nyog siv CSS media queries. Txhawm rau kom ua tiav qhov tsim nyog thiab kov zooming rau txhua yam khoom siv, ntxiv cov lus teb pom pom meta tag rau koj <head>
.
Koj tuaj yeem pom ib qho piv txwv ntawm qhov no hauv kev nqis tes ua hauv qhov pib template .
Rau qhov yooj yim dua qhov loj me hauv CSS, peb hloov tus box-sizing
nqi thoob ntiaj teb los ntawm content-box
mus rau border-box
. Qhov no ua kom padding
tsis muaj kev cuam tshuam rau qhov kawg suav dav ntawm ib lub caij, tab sis nws tuaj yeem ua teeb meem nrog qee tus neeg sab nrauv software xws li Google Maps thiab Google Custom Search Engine.
Nyob rau lub sijhawm tsis tshua muaj koj yuav tsum tau hla nws, siv qee yam zoo li hauv qab no:
Nrog cov snippet saum toj no, nested ntsiab-nrog rau generated cov ntsiab lus ntawm ::before
thiab ::after
—yuav tag nrho cov qub txeeg qub teg box-sizing
rau qhov ntawd .selector-for-some-widget
.
Kawm ntxiv txog lub thawv qauv thiab qhov loj me ntawm CSS Tricks .
Rau kev txhim kho tus ntoo khaub lig-browser rendering, peb siv Reboot los kho qhov tsis sib xws ntawm cov browsers thiab cov khoom siv thaum muab cov kev xav me ntsis rov pib dua rau cov ntsiab lus HTML.
Nyob twj ywm rau hnub tim ntawm kev txhim kho Bootstrap thiab ncav cuag lub zej zog nrog cov peev txheej no.
- Ua raws @getbootstrap ntawm Twitter .
- Nyeem thiab sau npe mus rau Lub Tsev Haujlwm Bootstrap Blog .
- Tham nrog cov phooj ywg Bootstrappers hauv IRC. Nyob rau hauv lub
irc.freenode.net
server, nyob rau hauv lub##bootstrap
channel. - Kev pab cuam tuaj yeem pom ntawm Stack Overflow (tagged
bootstrap-4
). - Cov neeg tsim khoom yuav tsum siv lo lus tseem ceeb
bootstrap
ntawm cov pob khoom uas hloov kho lossis ntxiv rau kev ua haujlwm ntawm Bootstrap thaum faib los ntawm npm lossis cov txheej txheem xa khoom zoo sib xws rau kev tshawb pom ntau tshaj plaws.
Koj tseem tuaj yeem ua raws @getbootstrap ntawm Twitter rau cov lus xaiv tshiab thiab cov yeeb yaj kiab txaus ntshai.