Web ページにスライド ショーが必要だったので、次のコードを使用しました。
<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>
それは私の画面の左に来ています。しかし、私はそれが私のウェブページの中心に来ることを望んでいました.
誰か教えてください。
ありがとう、よろしく、さびさち