How to download Bootstrap? What is the difference between the compiled version and the source version? What files are there after the compiled version of Bootstrap is downloaded?

01-Enter Bootstrap's official website
https://getbootstrap.com/

02-Select "All versions" in the upper right corner, or directly enter the version selection interface through the URL:
https://getbootstrap.com/docs/versions/
insert image description here
insert image description here

03-Select the version to download according to your needs on the page.
insert image description here
insert image description here
insert image description here

Usually download the compiled version (Compiled version), what is the compiled version of Bootstrap?
In Bootstrap (and many other front-end frameworks), "compilation" refers to converting source code (such as CSS, JavaScript, LESS, Sass, etc.) into a final, optimized file that can be understood and run by the browser. The purpose of compilation is to improve performance, reduce file size, and convert source code into code that browsers can parse and execute.

For Bootstrap's CSS, you'll see both compiled and uncompiled (or source) versions of the files.

The uncompiled source code file (usually with LESS or Sass extension) contains the style rules of the entire framework, component definitions, etc., as well as some variables and mixins (Mixins), which are used to customize the theme style and set various parameters of the framework. These source files may be easier to understand and modify, but they have not been optimized and compressed, so using them in a production environment may cause performance issues.

The compiled file (usually with .css extension) is generated by processing, compressing and optimizing the source code file, which is suitable for direct use in the production environment. Compiled files reduce file size, load faster, and optimize performance by removing unnecessary code and comments.

When you download the compiled Bootstrap package, what you actually get is the final style file that has been processed and can be used directly in the project. This way you don't need to compile it yourself, just drop these files into your project and use them.

However, if you want to customize the theme or styles, or need to modify the Bootstrap styles in more depth, you can download the source files, make the necessary customizations, and then compile them to produce a style file suitable for production environments.

In short, compilation is to optimize performance and file size, so that style files are suitable for running in browsers. For the vast majority of projects, directly using the compiled style files is the most appropriate choice.
insert image description here

04-Unzip after downloading, and then use the file according to your needs.
insert image description here
The Baidu network disk download address of the file bootstrap-4.5.3-dist.zip:
https://pan.baidu.com/s/14BM9gpC3K-LKxhyLGh4J9Q?pwd=m02m
insert image description here
The content of the directory/css is as follows:
insert image description here
The content of the directory/js is as follows:
insert image description here

Guess you like

Origin blog.csdn.net/wenhao_ir/article/details/132089650