gpt4 book ai didi

html - css direct-child 选择器选择所有级别的所有 child

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

此 css 代码应该只为 topUl 下的 li 标签的背景着色,但它为整个无序列表中的所有 li 的背景着色:

ul.topUl > li {
background-color: #ff0 !important;
}

我做错了什么?

最佳答案

据推测,您还没有更改后代 li 元素的默认背景颜色 transparent

关于html - css direct-child 选择器选择所有级别的所有 child ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22328740/

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