課程
/前端開發(fā)
/jQuery
/jQuery基礎(chǔ)(三)—事件篇
怎樣使用mouseover為網(wǎng)頁添加鼠標(biāo)懸停時添加背景圖片?
2016-07-02
源自:jQuery基礎(chǔ)(三)—事件篇 2-4
正在回答
$(ele).mouseover(function?()?{ ????$(this).css('background',?'url(../images/demo.png)?no-repeat?center?center'); });
qq_遠(yuǎn)方燈火閃爍_0 提問者
<div id="box">添加圖片</div>
$("#box").mouseover(function(){
$("#box").css({"background-image":"url","background-size:"cover"});
});
舉報
jQuery第三階段開啟事件修煉,掌握對頁面進(jìn)行交互的操作
3 回答有沒有出發(fā)鼠標(biāo)滾輪的事件
1 回答鼠標(biāo)點(diǎn)擊事件的第三個方法
3 回答這兩個鼠標(biāo)事件,我怎么感覺和click沒啥區(qū)別??。。?/p>
2 回答為什么這里鼠標(biāo)點(diǎn)擊也能出發(fā)mousedown、mouseup事件呢?
2 回答鼠標(biāo)在綠框內(nèi)(紅線外)移動時,冒泡事件觸發(fā)次數(shù)問題
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-07-02
2016-07-02
<div id="box">添加圖片</div>
$("#box").mouseover(function(){
$("#box").css({"background-image":"url","background-size:"cover"});
});