我使用Maximage jquery插件來創建全屏幻燈片。該插件允許您包含分佈在背景圖像頂部的HTML元素。我想使用HTML爲每個圖像提供一個標題,並將標題分層放置在我的網站頁腳的頂部(與Maximage分開)。我嘗試了各種定位,但找不到這樣做的方法,由於元素的順序,標題始終位於頁腳後面。有沒有人有任何想法我可能會這樣做?我的代碼如下後由maximage插件已經呈現 -Maximage插件位置:絕對
<div role="main">
<img id="cycle-loader" src="img/ajax-loader.gif" style="display: none;">
<div id="maximage" class="mc-cycle" style="width: 1282px; height: 294px; overflow: hidden; display: block;">
<div class="mc-image " data-href="" style="background-image: url("img/showcase/1-redmire.jpg"); position: absolute; top: 0px; left: 0px; display: block; z-index: 8; opacity: 1; width: 1282px; height: 294px;" title="">
<div class="slide-caption">
<p>Bespoke house in Mercaston, Derbyshire. Image produced for client issue.</p>
</div>
</div>
</div>
</div>
<footer>
<a id="arrow_left" href=""></a>
<a id="arrow_right" href=""></a>
<div id="controls"></div>
</footer>
而CSS -
footer
{
bottom: 0px;
position: fixed;
width: 100%;
background: url(../img/bg-black.png) repeat;
color: #FFF;
height: 55px;
line-height: 55px;
border-bottom: 1px solid #333;
}
.slide-caption
{
position: fixed;
z-index: 998;
bottom: 20px;
left: 20px;
color: #ffffff;
background: #000000;
padding: 5px;
}