Home > Web Front-end > Vue.js > body text

How to introduce css into vuejs

藏色散人
Release: 2023-01-13 00:45:39
Original
3248 people have browsed it

How to introduce css into vuejs: 1. Directly introduce the corresponding path under "" introduces external styles.

How to introduce css into vuejs

The operating environment of this article: Windows 7 system, vue version 2.9.6, DELL G3 computer.

vue.js introduces external CSS styles?

When learning Vue.js animation, you need to introduce an animate.css. How to introduce external files globally?

Introducing external CSS style files

1. Directly introduce the corresponding path under , but initiate a new request to obtain the style resource, and it is not scoped.


<style scoped>
 @import "../static/font/iconfont.css";
</style>
Copy after login

Note: If there is a style, it should be imported above #app, otherwise the introduction will not be successful!

2.@import is changed to to introduce external styles

## Recommended learning:《

vue tutorial

The above is the detailed content of How to introduce css into vuejs. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template