JavaScript
x
5
1
**This is my Styles.css File**
2
.headingStyle
3
{font-size:4rem;
4
color:blue;}
5
Iam importing these styles here but nothing is being applied to the heading
JavaScript
1
14
14
1
import React from "react"
2
import styles from "./Css/styles.css"
3
4
function App()
5
{
6
return (
7
<div>
8
<h1 class={styles.headingStyle}> CSS3 Testimonials Slider</ h1>
9
10
</div>
11
)
12
}
13
export default App
14
Advertisement
Answer
According to create-react-app documentation on CSS modules you should name your file styles.module.css and then import it like you already did
JavaScript
1
2
1
import styles from './styles.module.css';
2