1 回答

TA貢獻(xiàn)1772條經(jīng)驗(yàn) 獲得超6個(gè)贊
經(jīng)過大量的修補(bǔ),我能夠弄清楚:https ://jsfiddle.net/nateomardavis/p1kwrhmv
我用CSS
img
給了它一個(gè)。background-image
然后我將熱圖圖層設(shè)置為
relative
,并將圖像圖層設(shè)置為absolute
使用解決方案HERE。最后,我使用HERE概述的方法設(shè)置圖像層 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%;
}
添加回答
舉報(bào)