gpt4 book ai didi

css - 如何在 css 中更改页脚背景颜色?

转载 作者:太空宇宙 更新时间:2023-11-04 01:54:26 27 4
gpt4 key购买 nike

我在更改 CSS 文档中的页脚背景颜色时遇到问题。

footer{ background-color: lightblue; text-align: center; } 

我也无法更改旁边的背景颜色。

aside{ background-color: lightgray; }

非常感谢您的帮助。

最佳答案

您可以在页脚内使用 div。请参阅下面的 fiddle :

.site-footer {
background: orange;
}

#footer-content {
background: red;
}
<footer class="site-footer">
<div id="footer-content">
<p>Copyright 2017 @ Domain - All Rights Reserved </p>
</div>
</footer>

关于css - 如何在 css 中更改页脚背景颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42847629/

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