3zz*_*zzy 1 javascript browser safari jquery equals
$.fn.equalHeight = function () {
var height = 0,
reset = $.browser.msie ? "1%" : "auto";
return this.css("height", reset).each(function () {
height = Math.max(height, this.offsetHeight);
}).css("height", height).each(function () {
var h = this.offsetHeight;
if (h > height) {
$(this).css("height", height - (h - height));
}
});
};
Run Code Online (Sandbox Code Playgroud)
..在Firefox中运行良好,甚至是糟糕的IE6,但不适用于Webkit(Safari,Chrome).我如何解决它?
非常感谢
| 归档时间: |
|
| 查看次数: |
4808 次 |
| 最近记录: |