<image src="../../static/image/100.jpg" style="height:{{imgheight1}}px;width:100%;max-height: ;" ></image>
const device= uni.getSystemInfoSync();
var screenW = device.windowWidth;
export default {
data() {
return {
imgheight1: screenW*0.96
}
},
本文介绍了一种在前端开发中使图片高度自适应屏幕宽度的方法,并提供了具体的实现代码示例。
1029

被折叠的 条评论
为什么被折叠?



