Home  >  Article  >  Web Front-end  >  How to change the style of bootstrap

How to change the style of bootstrap

(*-*)浩
(*-*)浩Original
2019-07-19 10:34:184357browse

Using bootstrap can simplify our development process and code, but although bootstrap's code is very convenient, it also faces the situation that the css style is very monotonous.

How to change the style of bootstrap

#We can solve it by overriding the css style.

But when I was writing, I found that the code I covered could not change the original bootstrap code.

This is a small problem, but it has troubled me all afternoon, and there is no relevant answer online.

In fact, this problem is very simple, because html is rendered from top to bottom, and later styles will overwrite previous styles.

So if your css style cannot cover the bootstrap style, check whether the introduction of your own style is placed before the introduction of bootstrap.

The correct thing is to put your own style introduction behind the bootstrap introduction.

For example:

  <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
  <link rel="stylesheet" type="text/css" href="index.css"> //这是我的

For more technical articles related to Bootstrap, please visit the Bootstrap Tutorial column to learn!

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

Statement:
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