Home > Web Front-end > Bootstrap Tutorial > How to install bootstrap

How to install bootstrap

藏色散人
Release: 2019-07-18 11:03:31
Original
5238 people have browsed it

How to install bootstrap

How to install bootstrap?

bootstrap installation method:

Install through Bower

You can also install and manage Bootstrap through Bower Less, CSS, JavaScript and font files.

$ bower install bootstrap
Copy after login

Installation through npm

You can also use the npm tool to install Bootstrap:

$ npm install bootstrap@3
Copy after login

require('bootstrap') The function of the code is Load all jQuery plugins for Bootstrap. Among them, the bootstrap module itself does not export anything. You can manually load a single Bootstrap plug-in by loading the /js/*.js files in the top-level directory of the installation package.

Bootstrap’s package.json file contains some additional metadata:

● less - the path to the entry Less file of Bootstrap source code

● style - the uncompressed version of Bootstrap Path to CSS file

Installation through Composer

You can also install the Bootstrap installation package through Composer (Chinese official website: Composer Chinese website), which includes Less, CSS, and JavaScript and fonts files:

$ composer require twbs/bootstrap
Copy after login

Things to note when compiling Less/Sass source code

Bootstrap uses Autoprefixer to automatically add vendor-specific prefixes to certain CSS properties. If you are compiling Bootstrap from Less/Sass source and are not using the Gruntfile that comes with Bootstrap, you must integrate Autoprefixer into your compilation tools and process. If you are using our pre-compiled Bootstrap files or the Gruntfile files we provide, then there is no need to worry, we have already done this for you.

Related recommendations: "bootstrap tutorial"

The above is the detailed content of How to install bootstrap. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template