2013-12-21 2 views
0

impress.js에서 슬라이드 순서를 변경하고 싶습니다. 그러나 나는 단지 이것을 추가함으로써 그것을 할 수 없다. 이것을 할 방법이 있는가?감동 js에서 슬라이드 순서를 변경하는 방법

내 코드 보인다 사전에 아래

<!--slide 1--> 
<div id="title" class="step" data-x="0" data-y="0" data-scale="4"> 
    <span class="try">How to perform</span> <br/> 
    <h1>A Soft Handover</h1> 
    <span class="footnote">in Mobile Networks</span> 
</div> 

<!--slide 2--> 
<div id="its" class="step" data-x="850" data-y="3000" data-rotate="90" data-scale="5"> 
    <h2 style="font-size:72px">What is a soft handover?</h2> 
    <p style="font-size:40px;text-align:justify">When a mobile station moves from one base station's coverage to another's during an existing call, the base stations transfer services between each other to keep the call alive. 
    </p> 
</div> 

<!--slide 3--> 
<div id="its" class="step" data-x="-3500" data-y="4000" data-rotate="180" data-scale="6"> 
    <h2 style="font-size:72px">What is a?</h2> 
    <p style="font-size:40px;text-align:justify">When a mobile station moves from one base station's coverage to another's during an existing call, the base stations transfer services between each other to keep the call alive. 
    </p> 
</div> 

감사합니다있다.

+0

변경 데이터-X, 데이터 Y, 데이터 규모의 유용이 링크를 찾을 수 있습니다 실현 적절한 div. 나는 이것을 시험해 보았다. 그 일. 하지만, 그 일을 바꾸려면 인내심을 가져야합니다 ... 그 일이나 다른 문제가 있다면 알려주세요 ... – Karuppiah

+1

예 :

. 먼저 슬라이드가 첫 번째이고 어느 것이 두 번째인지 등의 계획을 세워야합니다. 슬라이더 순서를 변경하기 위해 이러한 사항을 변경하십시오. – Karuppiah

답변

1

impress.js 슬라이드는 html에 '단계'div가 나타나는 순서에 따라 정렬됩니다. 그래서 순서를 바꾸려면 html 파일로 이동해야합니다.

첫 번째 슬라이드의 인덱스는 0이고 두 번째 슬라이드의 인덱스는 1이고, goto (인덱스)는 첫 번째 슬라이드의 인덱스입니다.

자바 스크립트가 슬라이드를 방문하는 순서를 동적으로 변경하려면 javascript 파일을 사용하여 슬라이드 간 전환을 제어하는 ​​경우 원하는 색인에 대해 impress(). goto (index)를 호출 할 수 있습니다.

편집 :이 질문은 거의 세,하지만 impress.js를 사용하여 다른 사람을 위해, 당신은 https://gist.github.com/lavallee/2340157

관련 문제