What should I do if the ant style introduced in react is not displayed?

藏色散人
Release: 2023-01-19 15:24:09
Original
1275 people have browsed it

The solution to the problem that the ant style is not displayed when introduced into react: 1. Find the project entry "index.js" file; 2. Introduce "import 'antd/dist/antd.min" at the head of the "index.js" file .css';"; 3. Refresh the page.

What should I do if the ant style introduced in react is not displayed?

The operating environment of this tutorial: Windows 10 system, react18.0.0 version, Dell G3 computer.

react What should I do if the ant style introduced is not displayed?

The style cannot be displayed after react introduces Ant Design

Confirm that the project has been built according to the official document tutorial, and everything that should be downloaded has also been downloaded. Everything was normal at first, but when I was solving other problems, the style suddenly stopped showing up, and the interface was a mess. See the picture below

What should I do if the ant style introduced in react is not displayed?

A lot of changes were made this time. However, it doesn't work very well. The final solution:

Introduce import 'antd/dist/antd.css' into the project entrance index.js; refreshing it seems to be enough. . .

What should I do if the ant style introduced in react is not displayed?

Another day to urge myself to eat walnuts. . . See the effect

Please ignore my color matching and style, I will adjust it later, believe me

What should I do if the ant style introduced in react is not displayed?

Recommended learning: "react video tutorial

The above is the detailed content of What should I do if the ant style introduced in react is not displayed?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!