我有一个物化页脚的高度,我已经设置为35像素。但问题是页脚中的文本消失了。当它离开屏幕时,当我减小页脚的大小时,我如何将它向上移动
<footer style="position:fixed;bottom:0;left:0;width:100%;" class = "page-footer"> <div class = "footer-copyright"> <div class = "container"> © 2016 Copyright Information <a class = "grey-text text-lighten-4 right" href = "#!">Designed & Developed by XYZ</a> </div> </div>
现在,当我应用CSS来缩小页脚的大小,并将容器中的文本向上移动时,我得到了。
footer { height: 35px; } footer .container { margin-bottom : 50px; }
文本已显示,当我尝试将文本容器向上移动时,它不起作用。
我怎样才能解决这个问题,我哪里做错了。
注:我尝试了所有的答案,我得到的建议,但没有一个适合我。
footer .container { margin-bottom: 50px; }
这不管用,因为 .container footer 有固定的高度。
.container
footer
为避免文本消失,您可以尝试使用相同的值向页脚添加一行高度:
footer { height: 35px; line-height: 35px; }
footer { height: 35px; line-height: 35px; padding-bottom: 50px; }
;)