1
wolfan 2014 年 12 月 16 日 via Android
min-height:100%
么? |
2
ihuguowei 2014 年 12 月 16 日 background-size:cover
|
3
JoyNeop 2014 年 12 月 16 日 |
4
lemonda 2014 年 12 月 16 日
.home .site-header .bg-image {
background-image: url("../img/bitcoin-bg-1.jpg"); background-position: center center; background-size: cover; height: 100%; left: 0; position: absolute; top: 0; width: 100%; z-index: 1; } |
5
txlty 2014 年 12 月 16 日
测试的姿势不对。
把JS禁用,再看,效果没了。 |
6
pandada8 2014 年 12 月 16 日 via Android height:100vh
|
8
lvwzhen 2014 年 12 月 16 日 100vh 才是对的
|
9
Slienc7 2014 年 12 月 16 日
body {
margin:0; padding:0; background: #000 url('imgs.jpg') center center fixed no-repeat; -moz-background-size: cover; background-size: cover; } |
10
ooh 2014 年 12 月 17 日
body {
background: url(../img/bg.png) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } |
12
Grenadn 2014 年 12 月 17 日 via Android
需要把html元素和body元素设为height:100%,然后给body加上background,把它的background-size设为cover,over
|
13
kmvan 2014 年 12 月 17 日
这网站。。。居然是“沉浸式”顶栏。。。
|
14
fyh1807008 OP 正解 @JoyNeop
vh赞 |