gpt4 book ai didi

javascript - addClass ("test") 不起作用 - 但 css ("background","red") 起作用

转载 作者:行者123 更新时间:2023-11-30 07:47:25 24 4
gpt4 key购买 nike

有人知道为什么吗?

这是 JS:

$(".screenshots .tab1").hover(function() {
$(".section1").addClass("test");
}, function() {
$(".section1").removeClass("test");
});
});

还有 CSS:

.test {
background: black;
border: 1px solid #ffb75b;
background-color: #fffadb;
}

最佳答案

也许有一个 css 条目否决了你的条目。试试这个:

background-color: #fffadb !important;

关于javascript - addClass ("test") 不起作用 - 但 css ("background","red") 起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3563261/

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