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;  }

TAG标签: 微信小程序style标签

http://www.xiaochengxub.com/read-99697.html