in English

Tsitsani

Tsitsani Bootstrap kuti mupeze CSS yophatikizidwa ndi JavaScript, khodi yoyambira, kapena muphatikize ndi oyang'anira phukusi omwe mumakonda monga npm, RubyGems, ndi zina zambiri.

Kuphatikizidwa kwa CSS ndi JS

Tsitsani kachidindo kokonzekera kugwiritsa ntchito kwa Bootstrap v4.5.3 kuti mugwere pulojekiti yanu, yomwe ikuphatikiza:

Izi sizikuphatikiza zolemba, mafayilo oyambira, kapena kudalira kulikonse kwa JavaScript (jQuery ndi Popper.js).

Tsitsani

Mafayilo oyambira

Sungani Bootstrap ndi payipi yanuyanu potsitsa gwero lathu la Sass, JavaScript, ndi mafayilo olembedwa. Izi zimafuna zida zowonjezera:

  • Sass compiler (Libsass kapena Ruby Sass imathandizidwa) kuti mupange CSS yanu.
  • Autoprefixer ya CSS ogulitsa prefixing

Ngati mungafune zida zomangira , zikuphatikizidwa kuti mupange Bootstrap ndi zolemba zake, koma mwina ndizosayenera pazolinga zanu.

Tsitsani gwero

Zitsanzo

Ngati mukufuna kutsitsa ndikuwunika zitsanzo zathu , mutha kutenga zitsanzo zomwe zamangidwa kale:

Koperani Zitsanzo

jsDelivr

Lumphani kutsitsa ndi jsDelivr kuti mupereke mtundu wosungidwa wa Bootstrap wopangidwa ndi CSS ndi JS ku projekiti yanu.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>

Ngati mukugwiritsa ntchito JavaScript yathu yopangidwa ndipo mukufuna kuphatikiza Popper.js padera, onjezani Popper.js pamaso pa JS yathu, kudzera pa CDN makamaka.

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s" crossorigin="anonymous"></script>

Oyang'anira phukusi

Kokani mafayilo amtundu wa Bootstrap pafupifupi projekiti iliyonse yokhala ndi oyang'anira phukusi otchuka kwambiri. Ziribe kanthu woyang'anira phukusi, Bootstrap idzafuna compiler ya Sass ndi Autoprefixer pakukonzekera komwe kumagwirizana ndi mitundu yathu yovomerezeka.

npm

Ikani Bootstrap mu mapulogalamu anu a Node.js omwe ali ndi phukusi la npm :

npm install bootstrap

require('bootstrap')idzatsegula mapulagini onse a Bootstrap a jQuery pa chinthu cha jQuery. Module bootstrappalokha situmiza kunja chilichonse. Mutha kuyika mapulagini a Bootstrap a jQuery payekhapayekha pokweza /js/*.jsmafayilo pansi pa chikwatu chapamwamba cha phukusi.

Bootstrap's package.jsonili ndi metadata yowonjezera pansi pa makiyi awa:

  • sass- njira yopita ku fayilo yayikulu ya Sass ya Bootstrap
  • style- njira yopita ku CSS yosagwirizana ndi Bootstrap yomwe idakonzedweratu pogwiritsa ntchito zosintha (palibe makonda)

ulusi

Ikani Bootstrap mu mapulogalamu anu a Node.js omwe ali ndi phukusi la ulusi :

yarn add bootstrap

RubyGems

Ikani Bootstrap mu mapulogalamu anu a Ruby pogwiritsa ntchito Bundler ( yalimbikitsa ) ndi RubyGems powonjezera mzere wotsatira wanu Gemfile:

gem 'bootstrap', '~> 4.5.3'

Kapenanso, ngati simukugwiritsa ntchito Bundler, mutha kukhazikitsa mwala wamtengo wapatali poyendetsa lamulo ili:

gem install bootstrap -v 4.5.3

Onani zamtengo wapatali za README kuti mumve zambiri.

Wopeka

Mutha kukhazikitsanso ndikuwongolera Sass ya Bootstrap ndi JavaScript pogwiritsa ntchito Composer :

composer require twbs/bootstrap:4.5.3

NuGet

Ngati mukupanga .NET, mutha kukhazikitsa ndi kuyang'anira CSS ya Bootstrap kapena Sass ndi JavaScript pogwiritsa ntchito NuGet :

Install-Package bootstrap
Install-Package bootstrap.sass