css已经写好在非ie浏览器下可以实现跟随滚动
#roll{
display:block;
width:15px;
margin-right:466px;
margin-top:93px;
position:fixed;
right:50%;
top:162px;
_margin-right:382px;
_position:absolute;
_margin-top:252px;
_top:expression(eval(document.documentElement.scrollTop));
}

解决方案 »

  1.   

    在IE下不支持position:fixed;
    所以要用JS判断 我不知道怎么用单纯CSS实现
      

  2.   

    $(function () {
            var $scroll = $("#scroll"),            //scroll为跟随滚动条移动的dom id
                $window = $(window),
                offset = $scroll.offset(),         
                topPadding = 250;                  //距离顶部距离的大小,自己调整
            $window.scroll(function () {
                if ($window.scrollTop() > offset.top) {
                    $scroll.stop().animate({
                        marginTop: $window.scrollTop() - offset.top + topPadding
                    });
                } else {
                    $scroll.stop().animate({
                        marginTop: 0
                    });
                }
            });
        });不知道你是不是想要这种效果。
      

  3.   

    就是像淘宝网所有分类页这边那个菜单栏  http://list.taobao.com/browse/cat-0.htm