Download tau
Rub tawm Bootstrap kom tau muab tso ua ke CSS thiab JavaScript, qhov chaws, lossis suav nrog koj cov neeg saib xyuas pob nyiam xws li npm, RubyGems, thiab ntau dua.
Compiled CSS thiab JS
Download tau npaj-rau-siv compiled code rau Bootstrap v5.1.3 kom yooj yim poob rau hauv koj qhov project, uas suav nrog:
- Muab tso ua ke thiab txo cov pob CSS (saib CSS cov ntaub ntawv sib piv )
- Muab tso ua ke thiab minified JavaScript plugins (saib JS cov ntaub ntawv sib piv )
Qhov no tsis suav nrog cov ntaub ntawv, cov ntaub ntawv, lossis ib qho kev xaiv JavaScript nyob ntawm qhov zoo li Popper.
Cov ntaub ntawv qhov chaw
Sau Bootstrap nrog koj tus kheej cov cuab yeej kav los ntawm rub tawm peb qhov chaw Sass, JavaScript, thiab cov ntaub ntawv cov ntaub ntawv. Qhov kev xaiv no yuav tsum muaj qee yam cuab yeej ntxiv:
- Sass compiler rau sau Sass cov ntaub ntawv rau hauv CSS cov ntaub ntawv
- Autoprefixer rau CSS vendor prefixing
Yog tias koj xav tau peb cov cuab yeej tsim tag nrho , lawv suav nrog rau kev tsim Bootstrap thiab nws cov ntaub ntawv, tab sis lawv yuav tsis tsim nyog rau koj tus kheej lub hom phiaj.
Piv txwv
Yog tias koj xav rub tawm thiab tshuaj xyuas peb cov piv txwv , koj tuaj yeem rub cov piv txwv uas twb tau ua lawm:
CDN ntawm jsDelivr
Hla lub rub tawm nrog jsDelivr kom xa cached version ntawm Bootstrap's compiled CSS thiab JS rau koj qhov project.
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
Yog tias koj siv peb cov ntawv sau ua ke JavaScript thiab xav kom suav nrog Popper cais, ntxiv Popper ua ntej peb JS, ntawm CDN zoo dua.
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script>
Cov neeg saib xyuas pob
Rub hauv Bootstrap cov ntaub ntawv los ntawm yuav luag txhua qhov haujlwm nrog qee tus thawj tswj hwm pob nrov tshaj plaws. Txawm hais tias tus thawj tswj pob, Bootstrap yuav xav tau Sass compiler thiab Autoprefixer rau kev teeb tsa uas phim peb cov ntawv sau ua ke.
npm
Nruab Bootstrap hauv koj Node.js powered apps nrog npm pob :
npm install bootstrap
const bootstrap = require('bootstrap')
los yog import bootstrap from 'bootstrap'
yuav thauj tag nrho Bootstrap's plugins mus rau ib bootstrap
yam khoom. Lub bootstrap
module nws tus kheej xa tawm tag nrho peb cov plugins. Koj tuaj yeem manually thauj Bootstrap's plugins ib tus zuj zus los ntawm kev thauj cov /js/dist/*.js
ntaub ntawv hauv qab pob cov npe saum toj kawg nkaus.
Bootstrap's package.json
muaj qee cov metadata ntxiv nyob rau hauv cov yuam sij hauv qab no:
sass
- txoj kev mus rau Bootstrap lub ntsiab Sass cov ntaub ntawvstyle
- txoj kev mus rau Bootstrap's tsis-minified CSS uas tau precompiled siv lub neej ntawd nqis (tsis muaj customization)
xov
Nruab Bootstrap hauv koj Node.js powered apps nrog cov xov paj pob :
yarn add bootstrap
RubyGems
Nruab Bootstrap hauv koj Ruby apps siv Bundler ( pom zoo ) thiab RubyGems los ntawm kev ntxiv cov kab hauv qab no rau koj Gemfile
:
gem 'bootstrap', '~> 5.1.3'
Xwb, yog tias koj tsis siv Bundler, koj tuaj yeem nruab lub pov haum los ntawm kev khiav cov lus txib no:
gem install bootstrap -v 5.1.3
Saib lub pov haum README kom paub meej ntxiv.
Tus sau
Koj tuaj yeem nruab thiab tswj Bootstrap's Sass thiab JavaScript siv Composer :
composer require twbs/bootstrap:5.1.3
NuGet
Yog tias koj tsim hauv .NET, koj tuaj yeem nruab thiab tswj Bootstrap's CSS lossis Sass thiab JavaScript siv NuGet :
Install-Package bootstrap
Install-Package bootstrap.sass