WXSS样式的引入方式
- 外联样式 css(一般用于静态样式)
@import './xxx.wxss';
- 内联样式 style(一般用于动态样式)
<!--index.wxml--><view style="width:500rpx; height:30rpx; background-color:{{colorValue}}; "> hello,world!</view>
// index.jsPage({ data:{ colorValue: 'red' }})
- 选择器的优先级(权重)
/** index.wxss **/ .title{ color: red !important; }