2015-01-27 2 views
0

연구 2 일 후에도 여전히 해결책을 찾을 수 없습니다. 부트 스트랩 2.3.2 사이트의 배경 이미지를 사용하고 있습니다. 브라우저 창을 각 페이지 높이로 조정하는 방법을 알아 내려고 노력 중입니다. 처음에는 배경 이미지가 바닥 글 아래에 표시되었습니다.이 이미지는 바보 같았습니다. 백그라운드 오버 플로우시 모든 시도 : 숨김; 본문이나 이미지의 스타일 시트에 적용될 때 작동하지 않았습니다. 페이지 높이 평등 창 높이

` <script type="text/javascript"> 
var viewport = $(window).height(); 
$('.container-fluid').height(viewport); 
</script> 

` 이

신체의 범위 내에서 이미지를 얻었으나, 아무리 높은 브라우저 창을 스크롤하지 생산이 그렇다고했다 스크립트 코드입니다.

body { 
margin-top: 0px; 
margin-bottom: 0px; 
background: none; 
background-overflow: hidden; 
} 

.full { 
background: url(http://test2.gandlconsultants.com/assets/img/big-pic-01.jpg) no-repeat center center fixed; 
-webkit-background-size: cover; 
-moz-background-size: cover; 
-o-background-size: cover; 
background-size: cover; 
background-overflow: hidden; 
z-index: 999; 
} 

누군가가 페이지가 브라우저 창 픽셀의 x 개의 경우, 즉 페이지의 실제 높이에 자신을 제한하는 브라우저 창을 얻는 방법을 말해 주 시겠어요 :이 이미지에 사용되는 코드입니다 페이지의 x 높이로 조정합니다. 내가 이것을 쓰고있는 페이지는 그렇게한다. 고맙습니다.

+0

기본 HTML의 모양은 어떻습니까? – Marcelo

+0

페이지의 높이에 따라 창 크기가 조정된다는 의미입니까? 당신의 페이지가 브라우저 윈도우가 절반 크기가되어야한다면, 보류 윈도우가 절반으로 끝났다고할까요? –

+0

답변

1

변경

body { 
margin-top: 0px; 
margin-bottom: 0px; 
background: none; 
background-overflow: hidden; 
} 

body { 
margin-top: 0px; 
margin-bottom: 0px; 
background: none; 
height: 100vh; 
} 

.full { 
background: url(http://test2.gandlconsultants.com/assets/img/big-pic-01.jpg) no-repeat center center fixed; 
-webkit-background-size: cover; 
-moz-background-size: cover; 
-o-background-size: cover; 
background-size: cover; 
background-overflow: hidden; 
z-index: 999; 
} 

.full { 
background: url(http://test2.gandlconsultants.com/assets/img/big-pic-01.jpg) no-repeat center center fixed; 
-webkit-background-size: cover; 
-moz-background-size: cover; 
-o-background-size: cover; 
background-size: cover; 
height: 100vh; 
z-index: 999; 
} 

에 참고 : background-overlfow: hidden은 유효한 CSS가 아닙니다. background-origin: border-box;

+0

감사합니다. Tambo. 그러나 당신의 솔루션은 아무 것도 바뀌지 않았습니다. – user1887686

0

.full 클래스를 적용하여 문서의 배경을 표시하지 않은 요소를 지정했습니다. body 태그에없는 경우 CSS 클래스에 다음을 추가하는 것이 좋습니다.

+0

응답 Oluwatumbi 주셔서 감사하지만,이 문제를 해결하지 못했습니다. – user1887686