gpt4 book ai didi

css - 无法从一个 li 元素中删除背景颜色

转载 作者:行者123 更新时间:2023-11-28 08:11:48 25 4
gpt4 key购买 nike

网址是http://vs.avischulman.com/

现在我正在尝试从菜单的最后一个链接中删除金色背景和边框。 (右侧)这是一辆手推车。背景使它不可见。

我试过了

#top-cart {
background:none!important;
}

我还尝试使用 li#top-cart、#header #navigation ul.nav > li a:nth-child(4) 和其他一些方法进行选择,但均无济于事。

如有任何帮助,我们将不胜感激!

谢谢!

最佳答案

尝试针对此规则:

@media only screen and (min-width: 768px) {
#header #navigation ul.nav > li:last-of-type a { ... } }

使用 last-of-type 来定位最后一个 li 元素,

您将能够为菜单上的最后一个元素设置样式,以此类推其他屏幕分辨率...

关于css - 无法从一个 li 元素中删除背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29225122/

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