Tongela ba sites ya mbangu, oyo ezo répondre na Bootstrap
Bokumbi bisaleli ya liboso ya nguya, oyo ekoki kobakisama, mpe oyo etondi na makambo mingi. Tongela mpe bobongisi na Sass, salelá système ya grille oyo etongami liboso mpe ba composants, mpe mema ba projets na bomoi na ba plugins ya JavaScript ya makasi.
Botia ba fichiers Sass mpe JavaScript ya source ya Bootstrap na nzela ya npm, RubyGems, Composer, to Meteor. Ba installations oyo ekambami na paquet ezali na mikanda te to ba scripts na biso ya kotonga mobimba. Okoki mpe kosalela repo na biso ya modèle ya npm mpo na kobimisa nokinoki projet ya Bootstrap na nzela ya npm.
Tango osengeli kaka kotia CSS to JS ya Bootstrap oyo esangisi, okoki kosalela jsDelivr . Tala yango na mosala na ebandeli na biso ya mbangu ya pɛtɛɛ , to talá bandakisa mpo na kobanda mosala na yo ya nsima. Okoki pe kopona kotia Popper na JS na biso separatement .
<!-- 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>
Tanga ba guides na biso ya kobanda
Bozua saut na ko inclure ba fichiers source ya Bootstrap na projet ya sika na ba guides officiels na biso.
Bootstrap esalelaka Sass mpo na architecture modulaire mpe personnalisable. Importer kaka ba composants oyo esengeli, activer ba options mondiales lokola ba gradients na ba ombres, pe koma CSS na yo moko na ba variables na biso, ba cartes, ba fonctions, na ba mixins.
Importer stylesheet moko mpe ozali kokende na ba courses na fonctionnalité nionso ya CSS na biso.
// Variable overrides first
$primary:#900;$enable-shadows:true;$prefix:"mo-";// Then import Bootstrap
@import"../node_modules/bootstrap/scss/bootstrap";
Tongela mpe bobakisi na tango ya solo na ba variables ya CSS
Bootstrap 5 ezali ko évoluer na sortie moko na moko pona ko utiliser malamu ba variables CSS pona ba styles ya thème mondial, ba composants individuels, et même ba utilitaires. Tozali kopesa ebele ya ba variables mpo na balangi, mitindo ya makomi, mpe mingi mosusu na :rootniveau moko mpo na kosalela esika nyonso. Na ba composants na ba utilitaires, ba variables CSS ezali scoped na classe pertinente mpe ekoki ko modifier facilement.
Salelá ba variables na biso ya mokili mobimba:root mpo na kokoma ba styles ya sika. Ba variables ya CSS esalela var(--bs-variableName)syntaxe mpe ekoki ko hériter na ba éléments ya bana.
Bolongola ba variables ya classe globale, composante, to utilitaire mpo na ko personnaliser Bootstrap kaka ndenge olingi. Ntina ya kozongisa mobeko moko na moko te, kaka motuya ya sika ya variable.
Ya sika na Bootstrap 5, ba utilitaires na biso esalemi sikoyo na API na biso ya Utility . Totongaki yango lokola karte ya Sass oyo etondi na makambo mingi oyo ekoki kobongisama nokinoki mpe na pɛtɛɛ nyonso. Ezalaki naino pɛtɛɛ te kobakisa, kolongola, to kobongisa bakelasi nyonso ya utilitaire. Sala ba utilitaires responsives, bakisa ba variantes ya pseudo-classe, pe pesa bango ba kombo ya personnalisé.
// 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,)));
Ba plugins ya JavaScript ya makasi sans jQuery
Bakisa na pete biloko oyo ebombami oyo ekoki kobongola, ba modals mpe ba menu ya libanda ya toile, ba popovers mpe ba tolips ya bisaleli, mpe mingi mosusu —nyonso kozanga jQuery. JavaScript na Bootstrap ezali HTML-ya liboso, elingi koloba kobakisa ba plugins ezali pete lokola kobakisa databa attributs. Ozali na mposa ya bokonzi mingi? Botia ba plugins moko moko na ndenge ya programme.
Mpo na nini kokoma JavaScript mingi ntango okoki kokoma HTML? Pene na ba plugins nionso ya JavaScript ya Bootstrap ezali na API ya ba données ya classe ya liboso, oyo epesaka yo nzela ya kosalela JavaScript kaka na kobakisa databa attributs.
Bootstrap Icons ezali bibliothèque ya ba icônes ya SVG ya source ouverte oyo ezali na ba glyphes koleka 1.500, na mingi oyo ebakisami na ebimi nionso. Bazali kosala mpo na kosala na projet nyonso, ezala osaleli Bootstrap yango moko to te. Salelá yango lokola ba SVG to ba fonts ya bilembo —ba options nyonso mibale epesaka yo échelle ya vecteur mpe personnalisation ya pete na nzela ya CSS.
Sala yango ya yo na ba Thèmes officiels ya Bootstrap
Mema Bootstrap na niveau oyo elandi na ba thèmes premium oyo ewutaka na marché officiel ya ba Thèmes ya Bootstrap . Ba thèmes etongami na Bootstrap lokola ba cadres na bango moko oyo epanzani, riche na ba composants ya sika mpe ba plugins, documentation, mpe bisaleli ya kotonga ya makasi.