我想在wxss中设置js获取到的背景图片url,怎么把值传给wxss啊
微信小程序wxss可以动态的用js的值吗?怎么传?Can the WeChat applet wxss dynamically use the value of js? How to spread?
微信小程序wxss可以动态的用js的值吗?怎么传?我想在wxss中设置js获取到的背景图片url,怎么把值传给wxss啊
I want to set the URL of the background image obtained by JS in wxss. How can I pass the value to wxss
回答:
看代码片段,var变量,不过感觉意义不大 https://developers.weixin.qq.com/s/17Tmvzmq7rx9
wxml用style
可以的。使用var变量。https://developers.weixin.qq.com/s/tZTePzmF7Tx6
这个得写在行内样式里,不能在wxss里