[英]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.