我已經疊加兩個圖像成功,但在這裏,如果我用同樣的事,其他分區的圖像正在逐漸衝突是的jsfiddle代碼.. https://jsfiddle.net/cLew1t2v/這裏是代碼使用html和css覆蓋兩個圖像,如果我嘗試任何其他覆蓋他們是衝突?
<div >
<div style="position:relative;">
<img src="http://getfreedeals.co.in/wp-content/uploads/2012/08/get-Toaster-worth-Rs.350-free-on-purchase-of-Rs.275-worth-of-frying-pan.jpg" style="position:absolute; top: 0px; left: 0px; z-index: 1; ">
<img src="http://lh3.ggpht.com/-9_zNrpUMkQo/VMDgzXMlX4I/AAAAAAAAAS8/HY4BkO70fB0/s1600/images.jpeg" style="position:absolute; top: 220px; left: 20px; z-index: 3;">
</div>
</div>
<div >
<div style="position:relative;">
<img src="http://getfreedeals.co.in/wp-content/uploads/2012/08/get-Toaster-worth-Rs.350-free-on-purchase-of-Rs.275-worth-of-frying-pan.jpg" style="position:absolute; top: 0px; left: 0px; z-index: 1; ">
<img src="http://lh3.ggpht.com/-9_zNrpUMkQo/VMDgzXMlX4I/AAAAAAAAAS8/HY4BkO70fB0/s1600/images.jpeg" style="position:absolute; top: 220px; left: 20px; z-index: 3;">
</div>
</div>
我想並排放置兩個疊加的圖像,但是我可以看到它們一個在另一個之上,一旦可以檢查我的jsfiddle進行實況演示 – john
爲什麼使用絕對位置?有什麼目的嗎? –
來定位它相對於以前定位div – john