Gina cikin sauri, rukunin yanar gizo masu amsawa tare da Bootstrap
Kayan aiki mai ƙarfi, mai iya faɗaɗawa, da fasalin kayan aiki na gaba. Gina da keɓancewa tare da Sass, yi amfani da tsarin grid da aka riga aka gina da abubuwan haɗin gwiwa, da kawo ayyuka zuwa rayuwa tare da filayen JavaScript masu ƙarfi.
Sanya tushen Bootstrap Sass da fayilolin JavaScript ta npm, RubyGems, Mawaƙi, ko Meteor. Shirye-shiryen da aka sarrafa ba su haɗa da takardu ko cikakkun rubutun mu na ginawa ba. Hakanan zaka iya amfani da samfurin npm repo don samar da aikin Bootstrap da sauri ta hanyar npm.
Lokacin da kawai kuna buƙatar haɗa da Bootstrap's harhada CSS ko JS, zaku iya amfani da jsDelivr . Duba shi a aikace tare da saurin mu mai sauƙi , ko bincika misalan don fara aikinku na gaba. Hakanan zaka iya zaɓar haɗa Popper da JS ɗin mu daban .
<!-- 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>
Karanta jagororin farawa
Samun tsalle kan haɗa fayilolin tushen Bootstrap a cikin sabon aikin tare da jagororin mu na hukuma.
Bootstrap yana amfani da Sass don tsarin gine-gine na zamani da na musamman. Shigo da abubuwan da kuke buƙata kawai, ba da damar zaɓuɓɓukan duniya kamar gradients da inuwa, kuma rubuta CSS ɗin ku tare da masu canjin mu, taswirori, ayyuka, da mahaɗa.
Shigo da salo guda ɗaya kuma kun tafi ga tsere tare da kowane fasalin CSS ɗin mu.
// Variable overrides first
$primary:#900;$enable-shadows:true;$prefix:"mo-";// Then import Bootstrap
@import"../node_modules/bootstrap/scss/bootstrap";
Gina kuma ƙarawa a cikin ainihin lokaci tare da masu canjin CSS
Bootstrap 5 yana tasowa tare da kowane saki don mafi kyawun amfani da masu canji na CSS don salon jigo na duniya, abubuwan haɗin kai, har ma da kayan aiki. Muna ba da dama ga masu canji don launuka, salon rubutu, da ƙari a :rootmatakin don amfani a ko'ina. A kan abubuwan da aka gyara da abubuwan amfani, masu canjin CSS an keɓance su zuwa aji mai dacewa kuma ana iya canzawa cikin sauƙi.
Yi amfani da kowane nau'in canjin mu na duniya:root don rubuta sabbin salo. Masu canji na CSS suna amfani da var(--bs-variableName)sintax kuma abubuwan yara za su iya gadonsu.
Haɓaka sauye-sauye na duniya, sassa, ko masu amfani don keɓance Bootstrap kamar yadda kuke so. Babu buƙatar sake bayyana kowace doka, kawai sabon ƙima mai canzawa.
Sabo a cikin Bootstrap 5, yanzu API ɗin Utility ɗinmu ne ke samar da kayan aikin mu . Mun gina shi azaman taswirar Sass mai cike da fasali wanda za'a iya daidaita shi cikin sauri da sauƙi. Ba a taɓa samun sauƙi don ƙara, cirewa, ko gyara kowane azuzuwan masu amfani ba. Sanya abubuwan amfani su zama masu amsawa, ƙara bambance-bambancen aji, kuma ba su sunaye na al'ada.
// 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,)));
Abubuwan plugins masu ƙarfi na JavaScript ba tare da jQuery ba
Sauƙaƙe ƙara ɓoyayyun abubuwan da za a iya jujjuya su, modal da menus na kashe canvas, popovers da tukwici na kayan aiki, da ƙari sosai—duk ba tare da jQuery ba. JavaScript a cikin Bootstrap shine HTML-farko, wanda ke nufin ƙara plugins yana da sauƙi kamar ƙara datahalaye. Kuna buƙatar ƙarin sarrafawa? Haɗa plugins guda ɗaya ta hanyar shirye-shirye.
Me yasa ake rubuta ƙarin JavaScript lokacin da zaku iya rubuta HTML? Kusan duk Bootstrap's JavaScript plugins sun ƙunshi API ɗin bayanan aji na farko, yana ba ku damar amfani da JavaScript kawai ta ƙara datahalaye.
Bootstrap Icons babban ɗakin karatu ne na alamar SVG mai buɗewa wanda ke nuna sama da 1,500 glyphs, tare da ƙarin ƙarin kowane sakin. An tsara su don yin aiki a kowane aiki, ko kuna amfani da Bootstrap kanta ko a'a. Yi amfani da su azaman SVGs ko alamomin alamomi-dukkanin zaɓuɓɓukan suna ba ku sikelin vector da sauƙin keɓancewa ta hanyar CSS.
Sanya shi naku tare da Jigogin Bootstrap na hukuma
Ɗauki Bootstrap zuwa mataki na gaba tare da jigogi masu ƙima daga kasuwar Jigogin Bootstrap na hukuma . An gina jigogi akan Bootstrap azaman tsararren tsarin nasu, masu wadatar sabbin abubuwan gyara da plugins, takardu, da kayan aikin gini masu ƙarfi.