微信小程序-自定义组件修改样式

1、小程序的 外部样式属性:externalClasses 可以是 1个或多个 (string or array)


2 在组件标签里写上class

3、在使用组件的页面里的标签里 写上属性要对应的class类名


4、在使用的页面的wxss文件里中写上样式 刷新大功告成



微信小程序官方文档链接:

https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html

需要注意:看下图




猜你喜欢

转载自blog.csdn.net/amyloverice/article/details/80595448