2012-10-31 173 views
2

不知怎的,即使是最简单地上了impress.js滑不为我工作:(http://dl.dropbox.com/u/655237/events/GTG.zip ...,总是要使用你的例子。简单impress.js不起作用

<html lang="en"> 
    <head> 
     <title>Impress Demo</title> 
    </head> 
    <body> 
     <div id="impress"> 
      <div id="start"> 
        <p style='width:1000px;font-size:80px; 
       text-align:center'>Creating Stunning Visualizations</p> 
       <p>Impress.js </p> 
       </div> 

      <div id="slide2" data-x="-1200" data-y="0"> 
        <p style='width:1000px;font-size:80px;'> 
       First Slide Moves From Left To Right</p> 
       <p>Impress.js </p> 
       </div> 
     </div> 
     <script type="text/javascript">impress().init();</script> 
     <script type="text/javascript" src="js/impress.js"></script> 
    </body> 
</html> 

有和我没话说。 js的下js文件directory.Still没有最新的浏览器中显示的幻灯片,我使用的Firefox 16 enter image description here

回答

5

你调用加载库之前留下深刻的印象,尝试切换脚本标记的顺序为:

<script type="text/javascript" src="js/impress.js"></script> 
<script type="text/javascript">impress().init();</script> 

或者使用准备好的处理程序函数来初始化页面脚本,如window.onload或jquery的ready()。欲了解更多信息,请参阅this question

而且,由impress examples去,在最简单的情况下,呈现的每个步骤应符合step类名的#impress元件内部的元件。

+0

你是对的,订单是错误的。另外,我不得不为每个幻灯片div添加class =“step slide”。我想知道为什么我没有看到:| – SoulMan