自适应网页设置高度_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:33:10
Original
1251 people have browsed it


内容不够多footer部分下面还有留白的情况下,怎么让网页自适屏幕应高度?


回复讨论(解决方案)

html,body{height:100%;}.footer{position:absolute;bottom:0;}

<style>#footer{position:fixed;bottom:0;z-index:10}</style>
Copy after login

那个设置body的高度100%然后把footer这一块的样式设置bottom:0定位在body最下面就好了

html,body{height:100%;}.footer{position:absolute;bottom:0;}


但是我的内容有个边框,footer下去了,边框还在上面,有办法解决么?



    

         ......
    

    

        .......
    


 

     

...版权所有


 



这是我前段时间做得项目的写法,应该跟楼主想要的差不多,框架是这样的,楼主可以参考一下

边框和内容写在一个DIV里面,一起foot下去

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template