[英]Alternatives to SuperSized
我正在尋找Supersized的替代品。 我目前正在使用3.0版來顯示一些旋轉的背景圖像,並在Internet Explorer上發現了兩個問題。
有沒有人知道一個替代方案,或修改那些問題的調整?
使用任何滑塊並使用z-index
將其浮動到頁面內容后面。 我喜歡NIVO滑塊時,我只是滑動圖像, bxSlider當我需要滑動一個div或任意內容UL認證。
你正在應用z-index
的元素必須是position: relative;
或position: absolute
。 有關position: absolute;
一點需要注意position: absolute;
是它將相對於position: relative;
的第一個父元素position: relative;
元素position: relative;
或position: absolute
。 這聽起來可能令人困惑,所以如何舉例:
將滑塊放在<body>
並將其包裝在div中:
<body>
<div class="container">
<!-- Your slider divs/imgs/ul -->
</div>
<div class="rest-of-page">
...
</div>
</body>
然后一些CSS:
/* Position .container relative to body (not really needed, just an example) */
body { position: relative; }
/* Float slider behind content of page, expanding to width/height of document
* and use z-index of -1 to place it behind actual page content. */
.container {
position: absolute;
top: 0%;
left: 50%;
width: 100%;
height: 100%;
z-index: -1;
}
/* Float the actual page content above slider using z-index of 0 */
.rest-of-page { position: relative; z-index: 0; }
這應該做到這一點。 通常你必須為滑塊圖像定義一個寬度,但有一些擺弄,我認為你可以讓它工作。 在我自己的項目中,我一直將滑塊放在頁面中心,不占用整個背景,所以你的里程可能會有所不同。
我不確定這是否能滿足您的需求。 但是你可以看看SuperBGImage 。 實際上它的靈感來自超大尺寸,但有一些方便的改進
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.