微信小程序 组件引用wxss样式错乱,Some selectors are not allowed in component wxss, including tag name selectors, I-CSDN博客

177 阅读1分钟

今天做微信小程序,在组件引用过程中出现了样式错乱,在没引用之前都是好好的。

只见有这样的警告:

Some selectors are not allowed in component wxss, including tag name selectors, ID selectors, and attribute selectors.

找了好久,百度了一圈,最终还是看官方文档吧,原来是版本太低了,建议设置高版本就可以了。

developers.weixin.qq.com/miniprogram…

版本设置如下:

第一步:

如:

微信小程序样式错乱

标题

这样就正常了