0

부트 스트랩과 레일을 사용하고 있습니다. 나는 배경 이미지가 전체 배경을 차지하고 브라우저가 더 커질 때 늘어나려고 노력하고있다. 브라우저의 크기가 작을수록 이미지의 하단이 올라가고 브라우저 화면의 하단이 비어있는 경우를 제외하고는 대부분 작동합니다. 나는이 시도했다Rails/bootstrap에서 배경 이미지가 제대로 늘어나지 않는 이유는 무엇입니까?

body { 
    background-image: url('bilde.jpg'); 
    background-repeat: no-repeat; 
    background-position: fixed; 
    -webkit-background-size: cover; 
    -moz-background-size: cover; 
    -o-background-size: cover; 
    background-size: cover; 
} 

: 여기에 내가 지금 가지고있는 CSS입니다

body { 
    background-image: url('bilde.jpg') no-repeat center center fixed; 
    -webkit-background-size: cover; 
    -moz-background-size: cover; 
    -o-background-size: cover; 
    background-size: cover; 
} 

하지만 중 하나가 작동하지 않습니다. 누구든지이 문제에 대한 해답을 갖고 있습니까? 감사.

+0

이 동작을 보여주는 링크가 있습니까? – naeluh

+0

로컬로 실행하고 있지만 여기는 jsfiddle입니다. http://jsfiddle.net/QGJv6/ – Philip7899

답변

2

나는 그것을 알아 냈다. 차이가 나는

background: url('bilde.jpg') no-repeat center center fixed; 

대신

background-image: url('bilde.jpg') no-repeat center center fixed; 

꽤 미묘한의 사용 있었어야했지만 변화는 트릭을했다.

관련 문제