gpt4 book ai didi

jquery - 使用 jQuery 更改 html 背景图像

转载 作者:搜寻专家 更新时间:2023-10-31 22:16:13 25 4
gpt4 key购买 nike

我需要更改背景图片,所以我使用:

$('body').css({backgroundImage : 'url(images/wallpaper/'+wp+'.jpg)'});

但是,我需要使用属性:不重复固定左下角

如果我尝试:

$('body').css({backgroundImage : 'url(images/wallpaper/'+wp+'.jpg)  no-repeat fixed bottom left'});

它不起作用。有人能解决吗?

最佳答案

试试这个:

  $('body').css({background : 'url(images/wallpaper/'+wp+'.jpg)  no-repeat fixed bottom left'});

关于jquery - 使用 jQuery 更改 html 背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7311741/

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