第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

Failed to load resource: the server responded with a status of 404 (Not Found)的問題怎么解決呢

這是我的代碼,js文件和css樣式都是能用的,console.log里的內(nèi)容都能輸出,所以autoPlay函數(shù)是能夠運(yùn)行的,實(shí)在想不到是哪里的資源沒下下來。(而且上一個(gè)課程的走馬燈我也是能跑出來的)

```

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>

<script>

? ? $(()=>{

? ? ? ? console.log('頁面元素加載完執(zhí)行');

? ? ? ? var outerWidth = 600,

? ? ? ? ? ? outerHeight = 400,

? ? ? ? ? ? speed = 3,

? ? ? ? ? ? transitionTime = .3,

? ? ? ? ? ? initIndex = 0,

? ? ? ? ? ? setTimeId = null;

? ? ? ? var $marquee=$('.marquee');

? ? ? ? var $content=$marquee.find('.content');

? ? ? ? var $list=$content.find('.list');

? ? ? ? var listLength = $list.length;//list的長度之和就是content的寬度

? ? ? ? var contentWidth = outerWidth*listLength;//outerWidth就是之前所設(shè)置的list的寬度

? ? ? ? var style = document.styleSheets;//獲得頁面加載的樣式表

? ? ? ? $marquee.css({

? ? ? ? ? ? "width":`${outerWidth}px`,

? ? ? ? ? ? "height":`${outerHeight}px`

? ? ? ? });

? ? ? ? $list.css({//content需要list來算

? ? ? ? ? ? "width":`${outerWidth}px`,

? ? ? ? ? ? "height":`${outerHeight}px`

? ? ? ? });

? ? ? ? $content.css({//content需要list來算

? ? ? ? ? ? "width":`${contentWidth}px`,

? ? ? ? ? ? "height":`${outerHeight}px`,

? ? ? ? });

? ? ? ? var clone = $list.eq(0).clone();//選擇list列表里的第一個(gè)元素把它克隆下來放到content里面

? ? ? ? $content.append(clone);

? ? ? ? function autoPlay(){

? ? ? ? ? ? console.log('函數(shù)開始');

? ? ? ? ? ? initIndex++;

? ? ? ? ? ? setTimeId = setInterval(()=>{

? ? ? ? ? ? ? ? $content.css({

? ? ? ? ? ? ? ? ? ? "transition":`transform ${transitionTime}s ease`,

? ? ? ? ? ? ? ? ? ? "transform":`tanslateX(-${initIndex*outerWidth}px)`

? ? ? ? ? ? ? ? })

? ? ? ? ? ? },speed*1000)

? ? ? ? ? ? console.log('函數(shù)末端');

? ? ? ? }

? ? ? ? autoPlay()

? ? })

</script>

```


正在回答

0 回答

舉報(bào)

0/150
提交
取消

Failed to load resource: the server responded with a status of 404 (Not Found)的問題怎么解決呢

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號