课程: Hands-On Introduction: React

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Using CSS with React

Using CSS with React

- [Instructor] Let's get back into our project and I want to take a look at how we can improve a React project using CSS. When we first installed this project, you could see that there were some files that were CSS files that we were importing into different sections and I got rid of 'em and I've mostly been using the inline version of the CSS. I think that makes sense for a lot of places where you're doing things that don't have a lot of effects on other things but sometimes you need kind of like a global CSS file. And you can also use local CSS files that are imported into specific components, which works pretty well. Now the way that I'm going to do this is by creating an app.CSS file first. So, I'm here right now in this application. In the source folder, I'll create an app.CSS. So, normally the component CSS will apply only to the current code, and that's true if we import this CSS file into this app component.…

内容