課程
/前端開發(fā)
/HTML/CSS
/H5+JS+CSS3實(shí)現(xiàn)七夕言情
?scrollTo的參數(shù)封裝的是(x,speed) ?,為什么index里的?scrollTo是(speed,x)
2015-08-19
源自:H5+JS+CSS3實(shí)現(xiàn)七夕言情 4-3
正在回答
swipe.scrollTo = function (x, speed) {??????????? elements.css({??????????????? 'transition-timing-function': 'linear',??????????????? 'transition-duration': speed + 'ms',??????????????? 'transform': 'translate3d(-' + x + 'px,0px,0px)'??????????? });??????????? return this;??????? };
Uncaught TypeError: Cannot set property 'scrollTo' of undefined我想問一下為什么會(huì)出錯(cuò)
function scrollTo(time,proportionX) {
? ? ? ? ? ? var distX = container.width() * proportionX;
? ? ? ? ? ? swipe.scrollTo(distX,time);
? ? ? ? }
這段寫的太迷惑了,完全可以把函數(shù)名改成別的,總會(huì)把它和函數(shù)里的scrollTo弄混。
swipe.scrollTo(distX,time);才是滾動(dòng)背景? ??
你確定沒錯(cuò)? 我看到的
?swipe.scrollTo(distX,?time);
舉報(bào)
為七夕節(jié)準(zhǔn)備的H5+JS+CSS3特效案例,由淺入深案例拆分講解
4 回答scrollTo = function(){}
3 回答scrollTo(5000, 1)這個(gè)為啥沒有return 而且感覺不是scrollTo走完下面才走的,像是同步
1 回答walkTo參數(shù)問題
1 回答參數(shù)的問題
2 回答設(shè)置云的參數(shù)錯(cuò)了
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)微信公眾號
2015-12-24
swipe.scrollTo = function (x, speed) {
??????????? elements.css({
??????????????? 'transition-timing-function': 'linear',
??????????????? 'transition-duration': speed + 'ms',
??????????????? 'transform': 'translate3d(-' + x + 'px,0px,0px)'
??????????? });
??????????? return this;
??????? };
Uncaught TypeError: Cannot set property 'scrollTo' of undefined我想問一下為什么會(huì)出錯(cuò)
2015-09-13
function scrollTo(time,proportionX) {
? ? ? ? ? ? var distX = container.width() * proportionX;
? ? ? ? ? ? swipe.scrollTo(distX,time);
? ? ? ? }
這段寫的太迷惑了,完全可以把函數(shù)名改成別的,總會(huì)把它和函數(shù)里的scrollTo弄混。
swipe.scrollTo(distX,time);才是滾動(dòng)背景? ??
2015-08-19
你確定沒錯(cuò)? 我看到的