課程
/前端開發(fā)
/CSS3
/CSS3 3D 特效
在js代碼里添加什么內(nèi)容能讓他翻到6的時(shí)候繼續(xù)點(diǎn)擊next回到1呢?
2016-06-26
源自:CSS3 3D 特效 3-2
正在回答
我改了一下但效果不是太滿意
function next() {
if (curIndex == 6) {
var curPage = document.getElementById("page"+curIndex);
curPage.style.webkitTransform = "rotateX(-180deg)";
curIndex =1;
var nextPage = document.getElementById("page"+curIndex);
nextPage.style.webkitTransform = "rotateX(-360deg)";
return;
}
curIndex++;
慕粉3561184 提問者
在if(curIndex == 6)中可以更改,但如果那樣的話頁面動(dòng)畫效果將會不好,翻轉(zhuǎn)的方向重疊
舉報(bào)
使用CSS3當(dāng)中的屬性,創(chuàng)建真實(shí)可用的三維效果
2 回答循環(huán)點(diǎn)擊呢
1 回答不知道這樣寫合不合規(guī)矩,可是效果能實(shí)現(xiàn),請問有沒有問題
2 回答Uncaught TypeError: Cannot read property 'style' of null 有沒有人知道這個(gè)錯(cuò)誤該怎么解決啊
1 回答為什么我實(shí)現(xiàn)不了3D翻轉(zhuǎn)???
3 回答3d場景的實(shí)現(xiàn)
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-07-03
我改了一下但效果不是太滿意
function next() {
if (curIndex == 6) {
var curPage = document.getElementById("page"+curIndex);
curPage.style.webkitTransform = "rotateX(-180deg)";
curIndex =1;
var nextPage = document.getElementById("page"+curIndex);
nextPage.style.webkitTransform = "rotateX(-360deg)";
return;
}
var curPage = document.getElementById("page"+curIndex);
curPage.style.webkitTransform = "rotateX(-180deg)";
curIndex++;
var nextPage = document.getElementById("page"+curIndex);
nextPage.style.webkitTransform = "rotateX(-360deg)";
}
2016-07-03
在if(curIndex == 6)中可以更改,但如果那樣的話頁面動(dòng)畫效果將會不好,翻轉(zhuǎn)的方向重疊