带固定标头的条件粘性CSS页脚

带固定标头的条件粘性CSS页脚

本文介绍了带固定标头的条件粘性CSS页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试为以下情况找到一些解决方案:
-固定标题
-如果内容太短,页脚将停留在底部
-内容较长,页脚将我发现了这一点,但仅在标题不固定的情况下有效:



这是一些摆弄的CSS:



我看不到出了什么问题以及如何解决。



谢谢!

解决方案

不确定您的工作,对您要实现的目标进行更好的描述将有助于我为您提供更好的答案。




I tried to find some solution for the following scenario:- fixed header- if content is too short, footer will stick to bottom- of content is longer, footer will be appended to content and scrollable

I found this, but this works only while the header's not fixed:http://ryanfait.com/resources/footer-stick-to-bottom-of-page/

here's some fiddled CSS:http://jsfiddle.net/GxskJ/1/

I can't see what's going wrong and how to fix it. Another solution would be much appreciated as well.

thank you!

解决方案

not sure what you are doing,better description of what you want to achieve would help me in giving you a better answer..

http://jsfiddle.net/mvivekc/2a7SB/1/

这篇关于带固定标头的条件粘性CSS页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 03:25