[Vuejs]-Issue in using CSS to styling a vue template

0👍

Please read carefully documentation on how vue works. Usually vue connects to div#app and all going on there, so writing styles inside a component you can’t get to body and html tags. If you really need to have these styles to those tags you can use outer CSS file and connect it to HTML. But try to avoid doing some CSS in direct index.html because later you might forget where you did this, so you will spend a lot of time trying to find that.

I don’t see any reason to do like you want it. It’s easy to do without touching html and body.

Leave a comment