Sometimes, we want to add global CSS in Vue.js.
In this article, we’ll look at how to add global CSS in Vue.js.
How to add global CSS in Vue.js?
To add global CSS in Vue.js, we can import our global CSS file in main.js
.
For instance, in main.js
, we write
import "./assets/css/main.css";
to import the styles in ./assets/css/main.css
globally.
Conclusion
To add global CSS in Vue.js, we can import our global CSS file in main.js
.