1 回答
TA贡献1772条经验 获得超6个赞
经过大量的修补,我能够弄清楚:https ://jsfiddle.net/nateomardavis/p1kwrhmv
我用CSS
img给了它一个。background-image然后我将热图图层设置为
relative,并将图像图层设置为absolute使用解决方案HERE。最后,我使用HERE概述的方法设置图像层 css 。
.heatmap {
background-size: contain;
background-repeat: no-repeat;
width: 100%;
height: 300%; /*if the image is bigger than screen, this is needed */
position: relative;
}
.backgroundIMG {
background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Soccer_Field_Transparant.svg/1200px-Soccer_Field_Transparant.svg.png');
background-size: contain;
background-repeat: no-repeat;
position: absolute;
width: 100%;
height: 0;
padding-top: 151.33%;
}
添加回答
举报
