如果要定义一个自定义组件(页面)的背景颜色,我尝试这样写:
page {
background-color: #fff;
}
事实上这样会报错:
Some selectors are not allowed in component wxss, including tag name selectors, ID selectors, and attribute selectors.(./pages/support/support.wxss:2:1)
那么对自定义组件(页面)的背景颜色进行配置,WXSS要怎么写才是规范的?谢谢
Component({ options: { addGlobalClass: true, // 基础库2.2.3开始支持 }, }) // 样式写在page页面wxss或者app.wxss中