微信小程序wxss支持变量写法 <view class="di" style="--height--: {{height}}px"></view> .di { height: var(--height--); } https://blog.csdn.net/mrhaoxiaojun/article/details/88826685