2013-04-20 4 views
-2

개인 웹 페이지를 만들기 위해 부트 스트랩을 사용하고 있으며, 그래디언트 배경을 <body>에 추가하려고했지만 그곳에는 의미없는 공간이있었습니다. 여기에 이미지가 있기 때문에 하나 이상의 CSS 파일을 가지고 있기 때문에 jsfiddle를 포함 할 수 없습니다.페이지 하단의 추가 배경

http://jsfiddle.net/eJ3CL/

현재 부트 스트랩이 포함되어 있지 않기 때문에 jsfiddle에서 문제를 볼 수는 없지만이 스크린 샷은 다음과 같습니다

편집 : 는 부트 스트랩을 포함 Fiddle을 편집 및 콘텐츠의 높이를 설정 120px에서 중간 크기로 제공되므로 OP가 전달하고자하는 문제를 다른 사람들이 볼 수 있습니다.

이 원인을

when I set container height to 900

when I set container height to 500

? 이 문제를 어떻게 해결할 수 있습니까?

편집 됨 : 여기에 관련된 모든 코드가 있습니다.

<head> 
    <title>Burak Özmen - A Newbie Designer</title> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <link href="css/reset.css" rel="stylesheet" type="text/css"> 
    <!-- Bootstrap --> 
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> 
    <link href="style.css" rel="stylesheet" type="text/css"> 

</head> 
<body> 
    <div class="container container-top"> 
     <div class="page-header"> 
      <h1>Burak Özmen <small>A Newbie Developer</small></h1> 
     </div> 
    </div> 
    <div class="container container-middle"> 
     <div class="navbar navbar-static-top navbar-inverse"> 
      <div class="navbar-inner"> 
       <ul class="nav"> 
        <li><a href="#">Home</a></li> 
        <li><a href="#">About Me</a></li> 
        <li><a href="#" class="pull-right">Link</a></li> 
       </ul> 
      </div> 
     </div> 
     <div class="vertical-middle">In development... </div> 
    </div> 
</body> 
</html> 

있는 style.css : 신체 선택의 규칙이 선택을 HTML과 html 선택에 height:100%; 규칙을 추가 할 수

body { 
background: rgb(249,252,247); /* Old browsers */ 
background: -moz-linear-gradient(top, rgba(249,252,247,1) 0%, rgba(245,249,240,1) 100%); /* FF3.6+ */ 
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(249,252,247,1)), color-stop(100%,rgba(245,249,240,1))); /* Chrome,Safari4+ */ 
background: -webkit-linear-gradient(top, rgba(249,252,247,1) 0%,rgba(245,249,240,1) 100%); /* Chrome10+,Safari5.1+ */ 
background: -o-linear-gradient(top, rgba(249,252,247,1) 0%,rgba(245,249,240,1) 100%); /* Opera 11.10+ */ 
background: -ms-linear-gradient(top, rgba(249,252,247,1) 0%,rgba(245,249,240,1) 100%); /* IE10+ */ 
background: linear-gradient(to bottom, rgba(249,252,247,1) 0%,rgba(245,249,240,1) 100%); /* W3C */ 
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9fcf7', endColorstr='#f5f9f0',GradientType=0); /* IE6-9 */ 


} 

.container-middle { 
    height: 300px; 
    background: white; 

} 
+0

"그라데이션의 의미 공간이"무엇에 최소 높이를 줘? – Virus721

+0

단어로 표현할 수 없으므로 이미지를 업로드하여 표시합니다. 부적절한 언어로 불쌍히 여겨서 죄송합니다. –

+0

문제를 설명 할 수없는 경우 도움을 드릴 수 없습니다. – Virus721

답변

1

body { 
    min-height: 400px; 
} 
+0

감사합니다. –

0

이동.

html{ 
background: rgb(249,252,247); /* Old browsers */ 
background: -moz-linear-gradient(top, rgba(249,252,247,1) 0%, rgba(245,249,240,1) 100%); /* FF3.6+ */ 
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(249,252,247,1)), color-stop(100%,rgba(245,249,240,1))); /* Chrome,Safari4+ */ 
background: -webkit-linear-gradient(top, rgba(249,252,247,1) 0%,rgba(245,249,240,1) 100%); /* Chrome10+,Safari5.1+ */ 
background: -o-linear-gradient(top, rgba(249,252,247,1) 0%,rgba(245,249,240,1) 100%); /* Opera 11.10+ */ 
background: -ms-linear-gradient(top, rgba(249,252,247,1) 0%,rgba(245,249,240,1) 100%); /* IE10+ */ 
background: linear-gradient(to bottom, rgba(249,252,247,1) 0%,rgba(245,249,240,1) 100%); /* W3C */ 
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9fcf7', endColorstr='#f5f9f0',GradientType=0); /* IE6-9 */ 
height: 100%; 

} 

.container-middle { 
    height: 300px; 
    background: white; 

} 

그것은 파이어 폭스, 크롬과 IE9

에서 작동
+0

나에게 효과가 없습니다. –

+0

본문을 html로 변경 했습니까? 어떤 브라우저를 사용합니까? – zkanoca

+0

Google 크롬을 사용하고 있습니다. 그렇습니다. –

관련 문제