日期:2014-05-17  浏览次数:20607 次

请教positon的IE6的正常显示
为了让一个div一直固定在页面的左下角,现在CSS中用了
#position   {
        position:fixed;
        _position:absolute;
    bottom:   2%;
    left:   1%;
}

这在IE7和FF下运行都没有问题,但是无法在ie6正常显示,拉下滚动条时,那个被固定了的 <div> 段根本就没有变动

请问,如果要在ie6,7下都正常显示该怎么修改?

------解决方案--------------------
<?xml version= "1.0 " encoding= "utf-8 "?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN " "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml " xml:lang= "zh " lang= "zh ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=utf-8 " />
<title> Fixed Position @随网之舞 </title>
<style type= "text/css ">
*{margin:0;padding:0;}
body{background:#242424;color:#ccc;font-family:Verdana, Arial, Helvetica, sans-serif;line-height:150%;}
h1{text-align:center;line-height:200%;}
code{display:block;margin:0.5em;border:1px solid #282828;padding:1em;background:#222;color:#888;font:1em Fixedsys;}
code span{color:#666;font-family:Verdana;}
ul{margin:1em;}
#fixed{position:fixed;top:5em;right:0;background:#fff;color:#000;}
</style>
<!--[if IE]>
<style type= "text/css ">
*html body{overflow:hidden;}
*html #wrapper{height:100%;overflow:auto;}
*html #fixed{position:absolute;right:17px;}
</style>
<![endif]-->

</head>

<body>
<div id= "wrapper ">
<h1> Fixed Position </h1>
<pre> <code>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;zh&quot; lang=&quot;zh&quot;&gt;
&lt;head&gt;
<span> ...... </span>
&lt;!--[if lt IE 7]&gt;
&lt;style type=&quot;text/css&quot;&gt;
body{overflow:hidden;}
#wrapper{height:100%;overflow:auto;}
#fixed{position:absolute;right:17px;}
&lt;/style&gt;
&lt;![endif]--&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;wrapper&quot;&gt;
<span> ...... </span>
&lt;/div&gt;
&lt;div id=&quot;fixed&quot;&gt;&lt;h2&gt;{position:fixed}&lt;/h2&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code> </pre>
<ul>
<li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞 </li> <li> 随网之舞