代码之家  ›  专栏  ›  技术社区  ›  Daniel Ribeiro

Jquery css指南针式校正

  •  3
  • Daniel Ribeiro  · 技术社区  · 15 年前

        // 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) + "":
                "";
        }
    

    我已经开始扩展这个行为,使css3选择器与多浏览器兼容(使用了很多 Compass framework implements ).

    1 回复  |  直到 14 年前
        1
  •  1
  •   Mark    15 年前

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

    http://plugins.jquery.com/project/2d-transform

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

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