There are two ways to introduce Bootstrap CSS: Using CDN: Add tag in the HTML file, pointing to Bootstrap CDN. Load from a local file: Add a tag to the HTML file pointing to the Bootstrap CSS file that has been downloaded to the project directory.
How to introduce Bootstrap CSS
Bootstrap is a front-end framework for quickly developing responsive websites and applications . Introducing its CSS stylesheet is the first step to using Bootstrap.
Method 1: Use a CDN
Content Delivery Network (CDN) is a geographically distributed server network used to quickly serve static files. The following steps describe how to use a CDN to import Bootstrap CSS:
<head>
section, add the following code: <code class="html"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css"></code>
Method 2: Load from local file
If you have downloaded Bootstrap locally, you can follow the steps below to introduce its CSS:
dist
folder. <head>
section, add the following code: <code class="html"><link rel="stylesheet" href="path/to/bootstrap.min.css"></code>
Please change path/to/bootstrap.min.css
Replace with the exact path to the Bootstrap CSS file.
Note:
The above is the detailed content of How to introduce css into bootstrap. For more information, please follow other related articles on the PHP Chinese website!