3

当您使用 css 方法时,jQuery 具有不透明度校正(jQuery 1.4.2 上的第 4592-4608 行):

    // IE uses filters for opacity
    if ( !jQuery.support.opacity && name === "opacity" ) {
        if ( set ) {
            // IE has trouble with opacity if it does not have layout
            // Force it by setting the zoom level
            style.zoom = 1;

            // Set the alpha filter to set the opacity
            var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
            var filter = style.filter || jQuery.curCSS( elem, "filter" ) || "";
            style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
        }

        return style.filter && style.filter.indexOf("opacity=") >= 0 ?
            (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "":
            "";
    }

我已经开始扩展此行为以使 css 3 选择器与多浏览器兼容(使用Compass 框架实现的大量配方)。

有没有一个项目已经这样做了?

4

1 回答 1

1

有各种各样的项目涵盖了 CSS3 的不同方面。AFAIK 没有像样的统一项目。

我目前正在使用: http: //plugins.jquery.com/project/2d-transform

用于 CSS3 转换。在这个时候,我真的不太愿意推荐其他项目。

还有: http: //plugins.jquery.com/project/corners

于 2010-08-27T01:54:17.203 回答