问题描述:

I would like to know : how to recreate the effect or the content page comes to cover the homepage ? http://visia.themes.tf/

I tried with "background: fixed" but it doesn't work on iPhone. While the theme visia works perfectly on iPhone.

I tried to see the code source (ctrl + u on chrome). But I didn't find the properties of #home id.

Thank you in advance.

网友答案:
    .header {
        position: relative;
        height: 100%;
        overflow: hidden;
    }
    .header img {
        height: 100%;
        vertical-align: center;
        position: fixed;
        top: 0;
        z-index: -1;
    }
    .content {
        background: #FFF;
        position: absolute;
        top: 100%;
        z-index: 2
    }

JSFIDDLE : http://jsfiddle.net/jmtdjv19/6/

相关阅读:
Top