Malosiaga, fa'alautele, ma fa'apipi'i fa'ailoga meafaigaluega pito i luma. Fau ma fa'avasega ma Sass, fa'aoga faiga fa'avasega ma vaega, ma fa'aola galuega fa'atasi ma fa'apipi'i mamana JavaScript.
Faʻapipiʻi le puna o Bootstrap Sass ma faila JavaScript e ala ile npm, RubyGems, Composer, poʻo Meteor. O fa'apipi'i fa'afoe fa'apipi'i e le aofia ai fa'amaumauga po'o a tatou fa'amaumauga atoa. E mafai foi ona e faʻaogaina le matou npm template repo e vave faʻatupu ai se poloketi Bootstrap e ala ile npm.
A e manaʻomia le faʻapipiʻiina o le CSS tuʻufaʻatasia a Bootstrap poʻo le JS, e mafai ona e faʻaogaina jsDelivr . Va'ai i le gaioiga ma la matou amataga vave vave , po'o le su'esu'e i fa'ata'ita'iga e oso ai lau isi galuega. E mafai foi ona e filifili e aofia ai Popper ma matou JS eseese .
<!-- CSS only --><linkhref="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"rel="stylesheet"integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT"crossorigin="anonymous">
<!-- JavaScript Bundle with Popper --><scriptsrc="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8"crossorigin="anonymous"></script>
Faitau a matou taiala amata
Fai se oso i luga e aofia ai faila faila a Bootstrap i se galuega fou ma a matou taʻiala aloaia.
E fa'aogaina e Bootstrap le Sass mo se fausaga fa'apitoa ma fa'apitoa. Fa'aulufale mai na'o vaega e te mana'omia, fa'ataga avanoa i le lalolagi e pei o gradients ma ata lafoia, ma tusi lau oe CSS ma a matou fesuiaiga, fa'afanua, galuega, ma fa'afefiloi.
Fa'aulufale mai se sitaili se tasi ona e alu lea i tuuga ma vaega uma o la tatou CSS.
// Variable overrides first
$primary:#900;$enable-shadows:true;$prefix:"mo-";// Then import Bootstrap
@import"../node_modules/bootstrap/scss/bootstrap";
Fausia ma faʻalautele i le taimi moni ma fesuiaiga CSS
Bootstrap 5 o loʻo faʻaleleia i faʻasalalauga taʻitasi e faʻaoga lelei ai le CSS fesuiaiga mo sitaili autu o le lalolagi, vaega taʻitasi, ma e oʻo lava i mea aoga. Matou te tuʻuina atu le tele o fesuiaiga mo lanu, sitaili faʻamau, ma sili atu i se :roottulaga mo le faʻaogaina i soo se mea. I luga o vaega ma mea faʻaoga, o fesuiaiga o le CSS o loʻo faʻaogaina i le vasega talafeagai ma e faigofie ona faʻaleleia.
Fa'aoga so'o se tasi oa tatou suiga :rootole lalolagi e tusi ai sitaili fou. CSS fesuiaiga e faʻaaoga le var(--bs-variableName)syntax ma e mafai ona tuʻufaʻatasia e tamaiti elemene.
Aveese le lalolagi, vaega, po'o le fa'aogaina o le vasega e fa'avasegaina le Bootstrap i le mea e te mana'o ai. Leai se mana'oga e toe fa'ailoa tulafono ta'itasi, na'o se tau fesuia'i fou.
Fou i le Bootstrap 5, o matou mea aoga ua gaosia nei e la matou Utility API . Na matou fausia o se faafanua Sass faʻapipiʻiina e mafai ona vave ma faigofie ona faʻatulagaina. E le'i faigofie lava ona fa'aopoopo, aveese, pe suia so'o se vasega aoga. Fa'aoga mea fa'aoga, fa'aopoopo pseudo-class variants, ma tu'u i ai igoa fa'apitoa.
// Create and extend utilities with the Utility API
@import"bootstrap/scss/bootstrap";$utilities:map-merge($utilities,("cursor":(property:cursor,class:cursor,responsive:true,values:autopointergrab,)));
Mamana JavaScript plugins e aunoa ma le jQuery
Fa'afaigofie ona fa'aopoopo elemene natia feliuliua'i, modals ma offcanvas menus, popovers ma tooltips, ma le tele o isi mea—e aunoa ma le jQuery. JavaScript i Bootstrap o le HTML-muamua, o lona uiga o le faʻaopoopoina o plugini e faigofie pei o le faʻaopoopoina o datauiga. Manaomia nisi pule? Fa'aaofia fa'apolokalame fa'apipi'i ta'itasi.
Aisea e tusi atili ai le JavaScript pe a mafai ona e tusia HTML? Toeitiiti lava o mea uma a Bootstrap's JavaScript plugins o loʻo iai se API faʻamatalaga muamua, e mafai ai ona e faʻaogaina le JavaScript i le faʻaopoopoina datao uiga.
O le Bootstrap o loʻo faʻaalia ai le tele o plugini e mafai ona e tuʻuina i soʻo se poloketi. Tu'u uma i le taimi e tasi, pe filifili na'o mea e te mana'omia.
Bootstrap Icons o se faletusi faʻamaufaʻailoga SVG faʻaalia e sili atu i le 1,500 glyphs, faʻatasi ai ma le faʻaopoopoina o faʻasalalauga uma. Ua mamanuina e galulue i soʻo se poloketi, pe e te faʻaaogaina Bootstrap lava ia pe leai. Fa'aoga i latou e fai ma SVGs po'o fa'ailoga fa'ailoga-o filifiliga uma e lua e tu'uina atu ai ia te oe le fa'avasegaina o vete ma faigofie fa'apitoa e ala i le CSS.
Ave Bootstrap i le isi tulaga ma autu faʻapitoa mai le maketi aloaia Bootstrap Themes . O autu e fausia i luga o Bootstrap e avea ma a latou lava auivi faʻalautele, tamaoaiga i vaega fou ma faʻapipiʻi, faʻamaumauga, ma mea faigaluega mamana.