html 页面 固定,html – 固定页面,内容在标题后面滚动

CSS:

html,

body {

margin: 0;

padding: 0;

}

#background {

background: url(http://oi65.tinypic.com/29dhf6g.jpg) no-repeat center center fixed;

-webkit-background-size: cover;

-moz-background-size: cover;

-o-background-size: cover;

background-size: cover;

position: fixed;

top: 0;

left: 0;

z-index: -10;

width: 100%;

height: 100%;

}

#tableBackground {

position: fixed;

top: 30px;

width: 90%;

height: 100%;

max-width: 1200px;

background: rgba(255, 255, 255, 0.8);

left: 0;

right: 0;

z-index: 0;

margin: 0 auto;

}

#fixedHeader {

position: fixed;

overflow: hidden;

left: 50%;

top: 30px;

margin-left: -600px;

width: 1200px;

height: 80px;

z-index: 10;

}

#tableContainer {

height: 80%;

overflow: auto;

position: fixed;

top: 120px;

width: 100%;

margin: 0 auto;

}

.stocks {

margin: 20px auto;

}

h1 {

font-size: 1.4em;

text-align: center;

}

h2 {

font-size: 1.2em;

text-align: center;

}

html,

body {

margin: 0;

padding: 0;

}

#background {

background: url(http://oi65.tinypic.com/29dhf6g.jpg) no-repeat center center fixed;

-webkit-background-size: cover;

-moz-background-size: cover;

-o-background-size: cover;

background-size: cover;

position: fixed;

top: 0;

left: 0;

z-index: -10;

width: 100%;

height: 100%;

}

#tableBackground {

position: fixed;

top: 30px;

width: 90%;

height: 100%;

max-width: 1200px;

background: rgba(255, 255, 255, 0.8);

left: 0;

right: 0;

z-index: 0;

margin: 0 auto;

}

#fixedHeader {

position: fixed;

overflow: hidden;

left: 50%;

top: 30px;

margin-left: -600px;

width: 1200px;

height: 80px;

z-index: 10;

}

#tableContainer {

height: 80%;

overflow: auto;

position: fixed;

top: 120px;

width: 100%;

margin: 0 auto;

}

.stocks {

margin: 20px auto;

}

h1 {

font-size: 1.4em;

text-align: center;

}

h2 {

font-size: 1.2em;

text-align: center;

}

fixed header

Subheading

row 1 cell 1row 1 cell 2
row 2 cell 1row 2 cell 2
row 3 cell 1row 3 cell 2
row 4 cell 1row 4 cell 2
row 5 cell 1row 5 cell 2
row 6 cell 1row 6 cell 2
row 7 cell 1row 7 cell 2
row 8 cell 1row 8 cell 2
row 9 cell 1row 9 cell 2
row 10 cell 1row 10 cell 2
row 11 cell 1row 11 cell 2
row 12 cell 1row 12 cell 2
row 13 cell 1row 13 cell 2
row 14 cell 1row 14 cell 2
row 15 cell 1row 15 cell 2
row 16 cell 1row 16 cell 2
row 17 cell 1row 17 cell 2
row 18 cell 1row 18 cell 2
row 19 cell 1row 19 cell 2
row 20 cell 1row 20 cell 2
row 21 cell 1row 21 cell 2
row 22 cell 1row 22 cell 2
row 23 cell 1row 23 cell 2
row 24 cell 1row 24 cell 2
row 25 cell 1row 25 cell 2
row 26 cell 1row 26 cell 2
row 27 cell 1row 27 cell 2
row 28 cell 1row 28 cell 2
row 29 cell 1row 29 cell 2
row 30 cell 1row 30 cell 2
row 31 cell 1row 31 cell 2
row 32 cell 1row 32 cell 2
row 33 cell 1row 33 cell 2
row 34 cell 1row 34 cell 2
row 35 cell 1row 35 cell 2
row 36 cell 1row 36 cell 2
row 37 cell 1row 37 cell 2
row 38 cell 1row 38 cell 2
row 39 cell 1row 39 cell 2
row 40 cell 1row 40 cell 2
row 41 cell 1row 41 cell 2
row 42 cell 1row 42 cell 2
row 43 cell 1row 43 cell 2
row 44 cell 1row 44 cell 2
row 45 cell 1row 45 cell 2
row 46 cell 1row 46 cell 2
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值