2012-07-20 169 views
0

本质上,我打算从屏幕顶部到底部创建一个进度条。分为三部分,顶部是一种颜色,中间是另一种颜色,底部是另一种颜色。Css在Internet Explorer中无法正确显示

不幸的是,此代码只适用于FF和Chrome,但在IE(所有版本)中显示不正确。它目前只在IE中显示顶部颜色。

代码:

html, body 
{ 
    height: 100%; 
    margin: 10px;overflow: hidden; 
} 

#head 
{ 
    height: 80px; 
    background-color:black; 
} 

#content 
{ 
    min-height: 100%; 
    height: 100%; 
    margin: 0 auto; /*Allow for footer height*/ 
    vertical-align:bottom; 
} 

#prgsBar 
{ 
    margin: 0 auto -80px; /*Allow for footer height*/ 
    background-color:gray; 
} 

#footer, #push 
{ 
    height: 100px; /*Push must be same height as Footer */ 
} 

HTML:

<div id='content' style='background-color:red'>  
    <div id='head'>   
    <h5>Hello</h5> 
    </div>  
    <div id='prgsBar' style='height: 29%;'/></div> 
+0

你可以提供的HTML代码? – 2012-07-20 13:43:03

回答

3

你#prgsBar是自结束标记,不应该。

变化<div id='prgsBar' style='height: 29%;'/></div><div id='prgsBar' style='height: 29%;'></div>

相关问题