Home  >  Article  >  Web Front-end  >  What should I do if the css import is successful but has no effect?

What should I do if the css import is successful but has no effect?

藏色散人
藏色散人Original
2021-03-22 11:10:313003browse

The solution to the problem that the css import is successful but has no effect: 1. Open the web debugging tool and modify it according to the displayed error; 2. Check whether the "rel="stylesheet"" of the link tag is wrong and modify it. .

What should I do if the css import is successful but has no effect?

The operating environment of this article: Windows7 system, Chrome76.0&&CSS3 version, DELL G3 computer

The css file in the web page has no effect after being introduced ? How to solve the

tracking problem:

1. Open the web debugging tool and see if there are any errors.

A common error is that the imported file is at the target address. This file does not exist, causing the css to not take effect.

For example, the console of the Chrome browser will usually tell you what errors have occurred:

The errors that will generally be told are: File Does not exist, javascript error, etc.,

What should I do if the css import is successful but has no effect?

##2. Pay attention to whether the rel="stylesheet" of the link tag is wrong. If it is wrong, the general css will not take effect. The corresponding effect of css cannot be seen on the page:

<link rel="stylesheet" href="bootstrap/css/bootstrap.css" type="text/css" charset="utf-8"/>

I and some netizens have encountered this kind of problem, so please pay attention to whether this tag is written correctly.

【Recommended learning:

css video tutorial

The above is the detailed content of What should I do if the css import is successful but has no effect?. 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