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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

一個(gè)js的問題,沒辦法用js改變div的top值,提示Cannot set property 'top' of undefined

一個(gè)js的問題,沒辦法用js改變div的top值,提示Cannot set property 'top' of undefined

肖小波 2016-08-28 21:16:52
?? 樣式:??? ???? <div class="hom-foot">?? ??? ??? ??? ?<div class="hom-foot-txt">?? ??? ??? ??? ??? ?<p>1</p>?? ??? ??? ??? ??? ?<p>2</p>?? ??? ??? ??? ??? ?<p>3</p>?? ??? ??? ??? ??? ?<p>4</p>?? ??? ??? ??? ??? ?<p>5</p>?? ??? ??? ??? ??? ?<p>6</p>?? ??? ??? ??? ??? ?<p>7</p>?? ??? ??? ??? ??? ?<p>8</p>?? ??? ??? ??? ??? ?<p>9</p>?? ??? ??? ??? ??? ?<p>0</p>?? ??? ??? ??? ??? ?<p>1</p>?? ??? ??? ??? ??? ?<p>2</p>?? ??? ??? ??? ??? ?<p>3</p>?? ??? ??? ??? ??? ?<p>4</p>?? ??? ??? ??? ??? ?<p>5</p>?? ??? ??? ??? ??? ?<p>6</p>?? ??? ??? ??? ??? ?<p>7</p>?? ??? ??? ??? ??? ?<p>8</p>?? ??? ??? ??? ??? ?<p>9</p>?? ??? ??? ??? ??? ?<p>0</p>?? ??? ??? ??? ?</div>?? ??? ??? ?</div>.hom-foot{?? ?height: 375px;?? ?width: 100%;?? ?background: #444;?? ?color: #fff;?? ?font-size: 27px;?? ?line-height: 40px;?? ?overflow: hidden;?? ?position: relative;}.hom-foot-txt{?? ?height: 750px;?? ?width: 100%;?? ?background: red;?? ?font-size: 24px;?? ?line-height: 34px;?? ?position: absolute;?? ?top: 0px;?? ?left: 0px;}js:??? var footTxt=$(".hom-foot-txt");?? ?var foot=$(".hom-foot");?? ?var txtHeight=-34;?? ?footTxt.style.top = txtHeight + 'px';?? ?console.log("txtHeight")
查看完整描述

1 回答

已采納
?
業(yè)余奶茶品鑒師

TA貢獻(xiàn)260條經(jīng)驗(yàn) 獲得超388個(gè)贊

var?footTxt=$(".hom-foot-txt");
????var?foot=$(".hom-foot");
????var?txtHeight=-34;
????footTxt.css("top",txtHeight?+?'px');
????console.log(txtHeight);

js這樣寫。望采納

查看完整回答
1 反對(duì) 回復(fù) 2016-08-28
  • 1 回答
  • 0 關(guān)注
  • 4974 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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