📅  最后修改于: 2023-12-03 14:39:32.981000             🧑  作者: Mango
Bootstrap is a widely used open-source front-end framework for building responsive and mobile-first web applications. In this guide, I will walk you through the process of installing Bootstrap on your system.
Before starting the Bootstrap installation, make sure you have the following prerequisites:
Follow these steps to install Bootstrap:
Create a new directory for your project:
mkdir my-project
cd my-project
Initialize a new Node.js project using npm:
npm init -y
Install Bootstrap as a dependency:
npm install bootstrap
Bootstrap requires jQuery and Popper.js as peer dependencies. Install them as well:
npm install jquery popper.js
Include Bootstrap in your HTML file by adding the following lines to the head section:
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/popper.js/dist/umd/popper.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
You can now start using Bootstrap components and classes in your HTML code.
Here are some additional resources you can refer to for further learning:
I hope this guide helps you to successfully install Bootstrap and start building amazing web applications. Happy coding!