私はこれを短くて甘くするつもりです。Webkit ブラウザーでは、[私のサイト][1] に適用した自動リサイズ機能の応答が遅いようです。ブラウザーが調整された場合にのみ、適切な位置に配置されるようです。以下は私のJSのスニペットです。
function setTheHeight() {
if( $('.col-small, .img_hover').length ) {
//Get value of highest element
var maxHeight = Math.max.apply(Math, $('.col-small, .img_hover').map (
function() {
var totalHeight = 0;
$(this).children().each(function() {
totalHeight += $(this).outerHeight();
});
return totalHeight;
}
));
console.log(maxHeight);
$('.col-small, .img_hover').height(maxHeight);
}
}
setTheHeight();
$(window).resize(function() {
setTheHeight();
});
何か不足していますか??