我想在我的网页中显示幻灯片,为此我使用了以下代码:
<html>
<head>
<style>
#slideshow {
position:relative;
height:350px;
}
#slideshow IMG {
position:absolute;
top:0;
left:0;
z-index:8;
}
#slideshow IMG.active {
z-index:10;
}
#slideshow IMG.last-active {
z-index:9;
}
</style>
<script>
function slideSwitch() {
var $active = $('#slideshow IMG.active');
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
var $next = $active.next().length ? $active.next()
: $('#slideshow IMG:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval( "slideSwitch()", 5000 );
});
</script>
</head>
<body>
<div id="slideshow" align="middle">
<img src="img/11.jpg" alt="" class="active" />
<img src="img/12.jpg" alt="" />
<img src="img/13.jpg.jpg" alt="" />
</div>
</body>
</html>
它在我屏幕的左边。但我希望它出现在我网页的中心。
谁能告诉我该怎么做?
谢谢, 问候, Sabyasachi