mootools的颜色选择器(mooRainbow)用起来还是挺方便的,不过在ie6里有个小问题,就是会被下拉列表挡住

改进的方式很简单,在它的div外面套个iframe。

找到mooRainbow.jsdoLayout方法,在它的ie6判断中添加几行代码:
if (window.ie6) {
            div.setStyle(
'overflow''');
            var src 
= ov.src;
            ov.src 
= this.options.imgPath + 'blank.gif';
            ov.style.filter 
= "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
            src 
= ov2.src;
            ov2.src 
= this.options.imgPath + 'blank.gif';
            ov2.style.filter 
= "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
            
            
//add iframe
            var ifr = new Element('iframe'{
            
'class''iframe',
            
'frameborder'0,
            
'src''javascript:false'
            }
).inject(box);
        }

然后在mooRainbow.css中加入iframe的样式就可以了
.iframe
{
 position:absolute;
 visibility:visible;
 top:0px;left:0px;right:0px;bottom:0px;
 z-index:-1;
width:100%;
height:100%;
border-spacing:inherit;
}
posted on 2008-05-19 17:51  非我  阅读(645)  评论(0编辑  收藏  举报