-4

我在 php 包含文件上有我的标题徽标。我在标题图像之上创建了一个 div,我打算在 div 中包含一些较小图像的 Javascript 幻灯片。当我查看最终结果时,它一次只显示三个图像。什么都没有动。我正在学习,所以任何帮助将不胜感激!

这是我的CSS

@charset "utf-8";
img {
    border: 0px solid black;   
}

#banner {
    position: relative;    
}

#slideshow {
   position: absolute;
   top: 18px;
   left: 650px; 

   height: 90px;
   width: 150px;
   padding: 1px;
   background-color: white;
   border: 1px solid black;
}

这是我的php的内容包括

<script type="text/javascript" src="../js/jquery.cycle.all.js"></script>
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('#slideshow').cycle({ fx: 'fade'});
});
</script>
<link href="../style/banner.css" rel="stylesheet" type="text/css" />
<div id="banner">
  <a href="/"><img src="../images/header1.png" alt="Header" width="950" height="125" border="0" /></a>
    <div id="slideshow">
    <img src="../images/1.png" width="150" height="90" alt="test1" />
    <img src="../images/2.png" width="150" height="90" alt="test2" />
    <img src="../images/3.png" width="150" height="90" alt="test3" />
    </div>
</div>
4

1 回答 1

3

" When I view the end result it just shows three images all at once. Nothing is moving."

You must include jQuery first, before any other jQuery code or plugins...

<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../js/jquery.cycle.all.js"></script>
于 2013-10-23T22:13:03.597 回答