Header and footer with fixed position while content is scrollable?

后端 未结 3 1402
无人及你
无人及你 2020-12-31 10:05

I\'m trying to make a website where header and footer have fixed position while content scrolls in the middle.

3条回答
  •  情书的邮戳
    2020-12-31 10:56

    http://jsfiddle.net/yASFU/

    header
    push
    footer
    html, body {height:100%; margin:0; overflow:hidden;} header, footer {display:block; background-color:black; height:10%;} section {height:80%; background-color:lightblue; display:block; overflow:auto;} section .push {height:4000px;}

提交回复
热议问题