在Vue中引用全局css

例如:  //全局a标签取消下划线

方法一:

编写一个全局css文件,然后再App.vue的style中引用:

1.在assets下新建一个css文件夹,编写一个全局css文件:

 index.css:

a{
    text-decoration: none;
  }

2.在App.vue中引用该全局css:

<style lang="less">
@import './assets/css/index.css';   //引用全局css
#app
{ height: 100%; width: 100%; } </style>

方法二:

第一步同上,创建全局css文件,然后直接在main.js中引入全局css

方法三:

直接在index.html中设置style:

原文地址:https://www.cnblogs.com/Utopia-in-reality/p/14061309.html