1
wolfan 2014-12-16 20:29:16 +08:00 via Android
min-height:100%
么? |
2
ihuguowei 2014-12-16 20:31:58 +08:00 1
background-size:cover
|
3
JoyNeop 2014-12-16 20:34:12 +08:00 1
|
4
lemonda 2014-12-16 20:35:15 +08:00
.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 20:43:43 +08:00
测试的姿势不对。
把JS禁用,再看,效果没了。 |
6
pandada8 2014-12-16 20:56:09 +08:00 via Android 2
height:100vh
|
8
lvwzhen 2014-12-16 21:19:13 +08:00 1
100vh 才是对的
|
9
Slienc7 2014-12-16 22:09:51 +08:00
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 00:50:21 +08:00
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 09:22:31 +08:00 via Android
需要把html元素和body元素设为height:100%,然后给body加上background,把它的background-size设为cover,over
|
13
kmvan 2014-12-17 10:44:53 +08:00
这网站。。。居然是“沉浸式”顶栏。。。
|
14
fyh1807008 OP 正解 @JoyNeop
vh赞 |