2017-03-17 97 views
-2

我无法在CSS文档中更改页脚背景颜色。如何更改CSS中的页脚背景颜色?

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

我也不能改变旁边的背景颜色。

aside{ background-color: lightgray; } 

我真的很感谢帮助。

+2

的可能重复[我怎样才能改变CSS页脚的背景颜色(http://stackoverflow.com/questions/28245492/how-can-i-您可以提供的其他任何代码 – BioGenX

+1

更改背景颜色的页脚在css) html也许?在jsfiddle上弹出它总是一个不错的选择 – The4thIceman

回答

0

您可以在页脚内使用div。参见下文小提琴:

.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>