層跟隨鼠標(biāo)移動(dòng)
來(lái)源:易賢網(wǎng) 閱讀:906 次 日期:2016-06-16 10:38:32
溫馨提示:易賢網(wǎng)小編為您整理了“層跟隨鼠標(biāo)移動(dòng)”,方便廣大網(wǎng)友查閱!

一下代碼保存為.html運(yùn)行試試看

<script >

function bb()

{

document.getelementbyid(test).style.top = event.clienty + document.body.scrolltop+5;

document.getelementbyid(test).style.left = event.clientx +document.body.scrollleft+5 ;

}

</script>

<body>

<div style=height:1000px; width:1000px; background:#ff0000; onmousemove=bb()>

<div id=test style= position:absolute;left:100px; top:110px; background-color:#cccccc; width:100px; height:100px;>aaa</div>

</div>

</body>

更多信息請(qǐng)查看腳本欄目
上一篇:仿163郵件提示
易賢網(wǎng)手機(jī)網(wǎng)站地址:層跟隨鼠標(biāo)移動(dòng)
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢(xún)回復(fù)僅供參考,敬請(qǐng)考生以權(quán)威部門(mén)公布的正式信息和咨詢(xún)?yōu)闇?zhǔn)!
關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡(jiǎn)要咨詢(xún) | 簡(jiǎn)要咨詢(xún)須知 | 新媒體/短視頻平臺(tái) | 手機(jī)站點(diǎn)

版權(quán)所有:易賢網(wǎng)