Vue introduced .scss file
First look at the knowledge of sass: sass is a kind of a poppet css, you can generate browser can recognize css file to compile. File extension sass technology comes in two forms: .sass and .scss. The two difference is that .sass file has very strict requirements for typesetting code, and no braces, no semicolon. (Specifically not describe)
Introduced
引入方法一:
第一步需要在项目中引入
npm install sass-loader -D
npm install node-sass -D
引入方法二:
使用官方Sass Loader的引入方法
npm install sass-loader node-sass webpack --save-dev
npm install style-loader css-loader --save-dev
Use .scss file
<style lang="scss" scoped> //必须要加上“<style lang="scss" scoped>,否则引入失败(提示保存)
@import "../assets/style/mixin.scss"; //引入方式
.mint-tabbar>.mint-tab-item.is-selected {
background: #fafafa;
}
.mint-tabbar {
color: #818181;
position: fixed;
}
</style>