0

在 FF 和 Chrome 中工作,但努力寻找 IE9 解决方案。渐变有效,但它只是停在页脚的底部。我认为拥有 height:100% 可以解决这个问题,但它似乎没有效果。任何帮助将非常感激。谢谢你。这是我所拥有的:

代码

<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/style4.css"/>
<link rel="stylesheet" type="text/css" href="css/prfQ.css"/>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/IEstyle.css" />
<![endif]-->
<title></title>
</head>
<body>
<div id="header"></div>

<div id="container">

    <div id="left" class="column"></div>
    <div id="center" class="column"></div>
    <div id="right" class="column"></div>
</div>

<div id="footer"></div> 

css/IEstyle.css

@CHARSET "ISO-8859-1";

body {

-ms-filter:"progid:DXImageTransform.Microsoft.gradient ( startColorstr = '#424242',     endColorstr = '#e9e9e9' )";
background-image:
    url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9ImczMjIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiNFOUU5RTkiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiNGRkZGRkYiIG9mZnNldD0iMSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2czMjIpIiAvPgo8L3N2Zz4=);
}

css/style4.css

@CHARSET "ISO-8859-1";

* {
margin: 0;
padding: 0;
}

body {
height: 100%; margin : 0 auto;
padding-left: 352px;
padding-right: 352px;
background: -webkit-linear-gradient(top, #424242, #e9e9e9);
background: -moz-linear-gradient(top, #424242, #e9e9e9);
background-attachment: fixed;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
font-family: arial, helvetica, sans-serif;
margin: 0 auto;
}

#header {
background: red;
height: 50px;
min-width: 1154px;
}

#container {
float: left;
min-width: 1154px;
}

#container .column {
min-height: 800px;
float: left;
}

#footer {
background: blue;
height: 50px;
clear: both;
min-width: 1154px;
}

#center {
background: yellow;
min-width: 714px;
background: yellow;
}

#left {
background: orange;
min-width: 220px;
}

#right {
background: purple;
width: 220px;
}
4

1 回答 1

1

尝试附加IE背景渐变不body tag, but to html tag.

Another solution would be to set:

html {
    height: 100%;
}
于 2012-10-07T11:47:39.480 回答