当前位置:首页>维修大全>综合>

vuecss如何获取变量(vuecss怎么使用script中的变量)

vuecss如何获取变量(vuecss怎么使用script中的变量)

更新时间:2024-12-09 07:49:18

vuecss如何获取变量

vuecss获取变量方法如下:

 第一步:在src/assets/styles目录下新建 variable.styl 文件,这里放置一些公共CSS变量,比如背景颜色:$bgColor = #00bcd4

  第二步:引入variable.styl: @import '~styles/variable.styl,使用公共变量:background $bgColor

更多栏目