gpt4 book ai didi

jquery - 如何更改列表项的背景图像

转载 作者:太空宇宙 更新时间:2023-11-03 20:04:12 24 4
gpt4 key购买 nike

我想更改我的 <Li> bgImage onMouseOver 使用 jQuery

但是图片在三个div标签中

最佳答案

像这样:

$('li').mouseover(
function(){
$(this).css('background-image', 'url(hover.png) no-repeat top left');
},
function(){
$(this).css('background-image', 'url(normal.png) no-repeat top left');
}
);

关于jquery - 如何更改列表项的背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/649737/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com