天蠶在你身邊

不方便打電話(huà)?讓天蠶聯(lián)絡(luò )你

我們存在,我們思索,我們不斷進(jìn)取首頁(yè) >> 資訊 >> 網(wǎng)站建設行業(yè)新聞
重慶網(wǎng)絡(luò )公司 解決ie6 position fixed 失效問(wèn)題

重慶網(wǎng)絡(luò )公司在網(wǎng)站建設中為了達到某個(gè)效果往往會(huì )需要position fixed屬性,但是在IE6中 position fixed 不支持,那么該如何解決呢?你可以通過(guò)下面的代碼來(lái)實(shí)現:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>position:fixed的用法</title>
<style type="text/css">
*html {
    background-image:url(about:blank);
    background-attachment:fixed;
}
.div {
    height:1000px;
}
.fixed {
    width:300px;
    height:200px;
    position:fixed;
    background:#666;
    bottom:0px;
    left:0px;
}
#top {
    width:300px;
    position:fixed;
    bottom:0;
    right:0;
    height:200px;
    background:#000;
}
#top {
    _position:absolute;
    _bottom:auto;
  _top:expression(eval(document.documentElement.scrollTop+document.  documentElement.clientHeight-this.  offsetHeight-(parseInt(this.currentStyle.marginTop, 10)||10)-  (parseInt(this.currentStyle.marginBottom, 10)||0)));
}
.fixed {
    _position:absolute;
    _bottom:auto;
  _top:expression(eval(document.documentElement.scrollTop+document.  documentElement.clientHeight-this.  offsetHeight-(parseInt(this.currentStyle.marginTop, 10)||0)-  (parseInt(this.currentStyle.marginBottom, 10)||0)));
}
</style>
</head>
<body>
<div class="div"></div>
<div id="top">我在右下角</div>
<div class="fixed">我在左下角</div>
</body>
</html>


地址:重慶市渝中區上清寺鑫隆達B座28-8

郵編:400015

電話(huà):023-63612462

EMAIL:cnjl_net@163.com

渝ICP備09007657號-6

渝公網(wǎng)安備 50010302000872號

天天干夜夜拍天天干夜夜操_一级黄片免费看中文字幕_国产精品国产三级国产专区50_2021国产精品视频