如何把我现在这个代码左边栏,改成右边栏? 《在ie6浏览中,拉动浏览器滚动条有抖动如何解决?》或者那边有更好的代码,固定在隐藏在浏览器右侧,点击展开再点击隐藏效果的代码分享一下!<!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=gb2312" />
<title>无标题文档</title>
</head>
<style type="text/css">
body{
margin:0px; padding:0px; font-size:12px;
}
ul,li,p{
margin:0px; padding:0px;
}
ul,li{
list-style-type:none;
}
.obj{
width:250px; position:relative;
}
.btn{
width:50px; height:30px; line-height:30px; float:left; position:absolute; right:0px; top:0px; background-color:#ff76b0; color:#fff; text-align:center; cursor:pointer;
}
.box{
width:200px; height:300px; background-color:#fff; border:1px solid #ff76b0; border-left:0px; overflow:hidden;
}
</style>
<body><div style="height:10000px;"></div><div id="bug" class="obj">
<div class="btn" onclick="set()" id="bugbtn">点击展开</div>
<div class="box" id="bugbox">
内容
</div>
</div>
<script>
var ig=document.getElementById("bug");
var box=document.getElementById("bugbox");
var btn=document.getElementById("bugbtn");
var w=box.offsetWidth;
var isIE = (document.all) ? true : false;  
var isIE6 = isIE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 6); 
var Bind = function(object, fun) { 
    return function() {
        return fun.apply(object, arguments);
    }
}
ig.style.position ="fixed";
ig.style.zIndex='1000';
ig.style.left='-201'+"px";
ig.style.top='170'+"px";
if(isIE6){
ig.style.position ="absolute";
ig._fixed = Bind(ig, function(){
ig.style.marginTop = document.documentElement.scrollTop  + "px";
ig.style.marginLeft = document.documentElement.scrollLeft + "px";});
ig._fixed()
window.attachEvent("onscroll", ig._fixed);
}function set(){
    if(ig.offsetLeft+w==0)
        d(1);
    else
        d(-1);
}
function d(n){
    var T=setTimeout("d("+n+")",1);
    n=n<0?n-20:n+20
    ig.style.left=ig.offsetLeft+n+"px";
    if(ig.offsetLeft+w<=0){
        clearTimeout(T);
        ig.style.left=-w+"px";
        btn.style.backgroundColor="#ff76b0";
    }
    if(ig.offsetLeft>=0){
        clearTimeout(T);
        ig.style.left=0;
        btn.style.backgroundColor="#ff76b0";
    }
}
</script></body>
</html>