gpt4 book ai didi

css - 如何在 id 中格式化类类?

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

我有以下 HTML:

<div id="footer">
<div class="wrapper clear">
<!-- stuff -->
</div>
<div>

我应该在 css 文件中放置什么来格式化具有包装类和清晰类的 div,但仅当在页脚内时?

这是与 wordpress.com 一起使用的,所以我无法更改 HTML。

最佳答案

使用这个选择器:

#footer .wrapper.clear

请注意,IE6 无法正确处理多个类选择器,它会将上述内容视为这样(请参阅 here 进行比较):

#footer .clear

但在大多数情况下,这应该无关紧要。

关于css - 如何在 id 中格式化类类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4980944/

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