【Vue】引入外部自定义CSS

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Mr_EvanChen/article/details/81033683

1、定义css文件,这里是放在static下的css文件下

代码如下:

/* 公共样式 */
/* <style> */
  .title-style{
    padding: 0px 10px 15px 0px;font-size: 18px;font-weight: bold; border-bottom: 1px solid #e6e6e6;
  }
  .search-style{
    float: left; padding: 30px;
  }
  .btn-style{
    float: right; padding: 30px;
  }
  .el-table th{
    height: 40px;
    background: #e9edf5;
    color: #333;
  }
  .el-table td{
    height: 40px;

    /* background: #D9D9D9; */
  }
/* </style> */

2、在src下的main.js中进行引入即可使用

import '../static/css/global.css';      // 引入公共样式

猜你喜欢

转载自blog.csdn.net/Mr_EvanChen/article/details/81033683