채택완료

백그라운드 fixed 모바일 대응하는 법..

백그라운드 fixed가 웹에선 당연히 이뿌게 잘 구현이 됩니다.

모바일 아이폰,아이패드에선 완전 이미지 깨져나오고, 고정이 전혀 안되네요..

 

해결책이나 스크립트가 있을까요?

 

html -

Copy
<div id="cover">
        <div class="f_contact">
            <div class="f_c_p_box">
                <p class="f_c_p1">Start a project</p>
            </div>
        </div>
    </div>

 

css-

Copy
#cover {
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;

    @media (max-width: @iphone-screen) {
        background-attachment: scroll;
    }
}

 

.f_contact{ position:relative; background:url("../images/bg_footer.jpg") center center no-repeat #060606; background-size:cover; background-attachment:fixed; -webkit-overflow-scrolling:touch; height:300px; position:relative; width:100%;}
.f_c_p_box{position:absolute; top:12%; left:5%;}
.f_c_p_box .f_c_p1{color:#fff;}
|

답변 1개 / 댓글 1개

채택된 답변
+20 포인트

https://funyphp.com/archive/html/65

이곳의 css와 html을 참고 하시면 될 것 같습니다.

답변에 대한 댓글 1개

답변을 작성하려면 로그인이 필요합니다.