gpt4 book ai didi

jquery - 使用 jQuery 更改 标签上的 CSS 背景

转载 作者:太空宇宙 更新时间:2023-11-03 19:46:26 25 4
gpt4 key购买 nike

使用 jQuery,如何更改此 CSS?

html {
background: yellow;
}

这不起作用:

$('html').css('background','red');

最佳答案

使用

$(document.body).css('background-color','red');​​​​​​​​​​​​​​​

关于jquery - 使用 jQuery 更改 <html> 标签上的 CSS 背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13628711/

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