On the introduction of css File into react

problem description

is to introduce import". / style.css"; into the js file and find that it has no effect

the environmental background of the problems and what methods you have tried

I"ve used styled-components, but I"m not used to it

related codes

/ / Please paste the code text below (do not replace the code with pictures)

...
import "./css/style.css";
...
Mar.24,2022

this has to be aimed at your scaffolding. Some scaffolding can't. You'd better have your own scaffolding so that if something goes wrong, it's easy to find it. I couldn't bring it in when I used the swiper style. Finally, I looked at this man's scaffolding and found that it was only introduced by link.


maybe it was in the wrong position


it should be the scaffolding, for example, if you use antd, then your css introduction should be

    import styles from './css/style.css';

the class name that uses yes needs to be defined as

    className={styles.xxx}

if you don't add styles. , you need : global package
this is an example of scaffolding, depending on what you are using

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b40d6a-2b8aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b40d6a-2b8aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?