in div tag use style =「display:none;」除了一個之外,我給他們一個普通的班級名字。你也可以得到主叫的孩子們。在載入時將其更改爲「顯示:內聯」。唯一顯示的是沒有顯示的那個:沒有。使用的img標籤
例子,同樣的原理:
<div class="fadeit" id="thisisit" style="float: left; padding: 5px; height: 320px; width: 240px;">
<img height="320" width="240" class="andy" style="display: none;" src="http://news.phdcon.com/UserFiles/217/image/2750/2750-1.jpg" alt="" />
<img height="320" width="240" class="andy" style="display: none;" src="http://news.phdcon.com/UserFiles/217/image/2750/2750-2.jpg" alt="" />
<img class="andy" src="http://news.phdcon.com/UserFiles/217/image/2750/2750-3.jpg" alt="" />
<script language="javascript" type="text/javascript">
window.onload=function() {
$('.andy').css('display','inline');
$('.fadeit').cycle({
fx: 'fade',
speed: 300,
timeout: 3000,
next: '.fadeit',
pause: 1 ,
slideExpr: 'img.andy'
}); };
</script></div>
不幸的是沒有工作。我可能只是爲了我的背景色破解。感謝您的嘗試! – 2011-04-23 00:09:03