你的z-index:-1可能是問題的一部分,在網頁上默認的z-index最多的事:0,並可以覆蓋在一個z-index的圖像:-1。
無論如何,這對我的作品很好,我個人覺得事情是這樣的:
<div style="position:relative"> <!--relative to preceding stuff on web page -->
<img style="position:absolute" /> <!--absolute with respect to inside the <div> block -->
<img style="position:absolute" /> <!--obviously you need to specify more style data than shown here! -->
<!--as many more images as you like, organized to precise locations inside the <div> block-->
<!--other elements can also be precisely positioned in the <div> block; things like <p> and <span>
and <input> and <select> and <table> tags can have style data -->
</div>
<br />
<br />
<!-- use as many line-breaks as needed to reserve enough page-space for the stuff in the <div> block -->
<br />
<br />
<!-- the rest of the web page now begins -->
給演示鏈接或作出的jsfiddle – 2014-09-01 08:24:29
'repeat'不是CSS有效樣式,即時通訊假設你意味着'背景重複'。我還假設你的意思是'背景圖像'而不是'內容'? – haxxxton 2014-09-01 08:26:45
@haxxxton是的,這是真的 – 2014-09-01 08:28:55