Tsibela kumxholo ophambili Tsiba uye kukhangelo lwamaxwebhu
Check
in English

Khuphela

Khuphela i-Bootstrap ukuze ufumane i-CSS ehlanganisiweyo kunye neJavaScript, ikhowudi yomthombo, okanye uyifake kunye nabaphathi bephakheji obathandayo njenge-npm, i-RubyGems, kunye nokunye.

I-CSS ehlanganisiweyo kunye ne-JS

Khuphela ikhowudi esele ilungele ukusetyenziswa yeBootstrap v5.2.1 ukuze uwele ngokulula kwiprojekthi yakho, ebandakanya:

Oku akubandakanyi uxwebhu, iifayile zentsusa, okanye naziphi na ezikhethwayo ezixhomekeke kwiJavaScript njengePopper.

Khuphela

Iifayile zomthombo

Qokelela i-Bootstrap kunye nombhobho we-asethi yakho ngokukhuphela umthombo wethu we-Sass, iJavaScript, kunye neefayile zamaxwebhu. Olu khetho lufuna isixhobo esongezelelweyo:

Ukuba ufuna iseti yethu epheleleyo yezixhobo zokwakha , zibandakanyiwe ekuphuhliseni i-Bootstrap kunye nee-docs zayo, kodwa kusenokwenzeka ukuba azilungelanga iinjongo zakho.

Khuphela umthombo

Imizekelo

Ukuba ufuna ukukhuphela kwaye ujonge imizekelo yethu , ungabamba imizekelo esele yakhiwe:

Khuphela Imizekelo

CDN nge jsDelivr

Tsiba ukhuphelo ngejsDelivr ukuhambisa uguqulelo olugciniweyo lweBootstrap eqokelelweyo yeCSS kunye neJS kwiprojekthi yakho.

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script>

Ukuba usebenzisa iJavaScript yethu ehlanganisiweyo kwaye ukhetha ukubandakanya iPopper ngokwahlukeneyo, yongeza iPopper phambi kweJS yethu, ngeCDN ngokukhethekayo.

<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"></script>

Abaphathi bephakheji

Tsala iifayile zomthombo weBootstrap phantse kuyo nayiphi na iprojekthi enabaphathi bepakethe abadumileyo. Kungakhathaliseki ukuba umphathi wephakheji, i-Bootstrap iya kufuna i- Sass compiler kunye ne - Autoprefixer yokuseta oluhambelana neenguqulelo zethu ezisemthethweni ezihlanganisiweyo.

npm

Faka i-Bootstrap kwi-apps yakho ye-Node.js ene -npm package :

npm install [email protected]

const bootstrap = require('bootstrap')okanye import bootstrap from 'bootstrap'izakulayisha zonke iiplagi zeBootstrap bootstrapkwinto. Imodyuli bootstrapngokwayo ithumela ngaphandle zonke iiplagi zethu. Uyakwazi ukulayisha ngesandla iiplagi zeBootstrap ngabanye ngokulayisha /js/dist/*.jsiifayile phantsi kolawulo lomgangatho ophezulu wepakethe.

I-Bootstrap's package.jsoniqulethe i-metadata eyongezelelweyo phantsi kwezi zitshixo zilandelayo:

  • sass- indlela eya kwiBootstrap eyona fayile yomthombo weSass
  • style-indlela eya kwi-Bootstrap's non-minified CSS ehlanganiswe kusetyenziswa useto olungagqibekanga (akukho ngokwezifiso)
Qalisa ngeBootstrap nge-npm ngeprojekthi yethu yokuqalisa! Intloko uye kwi- twbs/bootstrap-npm-starter template repository ukubona indlela yokwakha kunye nokwenza ngokwezifiso i-Bootstrap kwiprojekthi yakho ye-npm. Kubandakanya i-Sass compiler, i-Autoprefixer, i-Stylelint, i-PurgeCSS, kunye ne-Icons ze-Bootstrap.

umsonto

Faka i-Bootstrap kwi-Node.js usetyenziso olunikwe amandla ngepakethe yomsonto :

RubyGems

Faka i-Bootstrap kwii -apps zakho zeRuby usebenzisa iBundler ( iyacetyiswa ) kunye neRubyGems ngokongeza lo mgca ulandelayo kweyakho Gemfile:

gem 'bootstrap', '~> 5.2.1'

Kungenjalo, ukuba awusebenzisi i-Bundler, ungafaka i-gem ngokusebenzisa lo myalelo:

gem install bootstrap -v 5.2.1

Jonga gem's FUNDA ngeenkcukacha ezithe vetshe.

Umqambi

Unokufaka kwaye ulawule iSass yeBootstrap kunye neJavaScript usebenzisa uMqambi :

composer require twbs/bootstrap:5.2.1

NuGet

Ukuba uphuhlisa kwi-.NET Framework, ungafaka kwaye ulawule i-Bootstrap's CSS okanye iSass kunye neJavaScript usebenzisa i - NuGet . Iiprojekthi ezintsha kufuneka zisebenzise i-libman okanye enye indlela njengoko i-NuGet iyilelwe ikhowudi ehlanganisiweyo, hayi ii-asethi ezingaphambili.

Install-Package bootstrap
Install-Package bootstrap.sass