.cardNum { height : 476 rpx; border-bottom : 1px solid #e6eef8 ; background : url ( "http://wx.???.com/images/sprogram/cardInfo/bg1.png" ) no-repeat ; background- size : 100% 100% ; } |
如何wxss引用全局公共变量,或者如何解决背景图片路径是死的没办法替换。问题
网友回复
祺爸?:
wxss不能引用全局公共变量,需要动态设置就直接写到wxml的style里
鲤子:less来预处理,如果变量是js赋值,那只能在wxml里style加,或者用wxs也可以改。
老张:
这个好象只能写在wxml的style里。