我正在尝试使用以下方法将图像放置在滑块顶部:
CSS:
#orbitDemo { background: url(../../images/orbit/spinner.gif) no-repeat center center
#3c3c3c; height: 300px; }
#orbitDemo.orbit { height: auto; }
#orbitDemo img, #orbitDemo div { display: none; }
#orbitDemo.orbit img, #orbitDemo.orbit div { display: block;}
@media handheld, only screen and (max-width: 767px) {
dl.nice.tabs.mobile { margin-bottom: 0px; }
.nice.tabs.mobile dd a { padding: 12px 20px; }
div.foundation-header h1 { font-size: 32px; font-size: 3.2rem; }
}
#container
{
margin-left: auto;
margin-right: auto;
width: 950px;
padding: 5px 15px 20px 15px;
border: 1px solid;
border-top: 1px solid #CCC;
border-left: 1px solid #CCC;
border-right: 1px solid #BBB;
border-bottom: 1px solid #BBB;
border-radius: 4px;
-moz-border-radius: 4px;
box-shadow:inset 0 0 2px #ccc;
background: #fff;
margin-bottom: 15px;
}
#image
{
position: absolute;
display: none;
z-index: 2000; // might need to be changed if you cant see it
}
HTML:
<div id="sliderbg">
<div class="container">
<div class="row">
<div id="orbitDemo">
<div>
<a href="<?php echo $link1; ?>" >
<img src="<?php echo $slide1 ;?>" alt="Slider" />
</a>
</div>
<div>
<a href="<?php echo $link2; ?>">
<img src="<?php echo $slide2 ;?>" alt="Slider" />
</a>
</div>
<div>
<a href="<?php echo $link3; ?>">
<img src="<?php echo $slide3 ;?>" alt="Slider" />
</a>
</div>
<div id="image">
<img src="<?php echo $slide0 ;?>" (This is the image over the slider.)
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$(window).load(function() {
$('#orbitDemo').orbit({
animation: 'horizontal-push',
bullets: false,
});
});
});
这很好用。我没有遇到任何问题,只是它将我想要的图像呈现在最后作为另一面。我会以错误的方式解决这个问题吗?我怎样才能让它跳过这张图片或重写它,使它看起来不像另一张幻灯片?