给图片写下下面代码之后,
<image mode="{{index2===0?'widthFix':'scaleToFill'}}" src="{{item2.image_src}}" ></image>
在写下下面的代码之后后面四个图片高度直接变成零了。有没有大佬解答一下为什么??/
.floor_list{
navigator{
float: left;
width: 33.33%;
&:nth-last-child(-n+4){
height: 33.33vm * 386 /232 /2;
}
image{
width: 100%;
height: 100%;
}
}
}
还是提供代码片段吧,你这样都没看懂
不好意思第一次写微信小程序代码,不清楚要发代码片段。现在补上
https://developers.weixin.qq.com/s/ZGD029ms73j0
小程序css不支持这种写法吧:
height: 33.33vm * 386 /232 /2;
追加:看了代码片段后把height: 27.72711207vm改为 height: 27.72711207vmin;就可以了
麻烦提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
弄一个 [ 能复现问题的简单的 ] 代码片段
https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html