标题的父元素具有固定的高度(目前在我的屏幕上为 402px)和相对定位。这就是导致内容低于标题的原因。
<div id="banner" style="height:402px;">
该网站正在使用 JS 来保持这个高度正确。
脚本来源:http ://static.hairproject.ch/js/script.js
感兴趣的代码:
// Figure out browser width/height and ajust main picture -------------------------------------------------
var width = $(window).width();
var height = $(window).height();
if ((width > 320) && (width <= 480)) { height = height + 240; }
else if (width <= 320) { height = height + 80; }
var margintop = Math.round((height/3) - 120);
$("body.home #banner").attr("style","height:" + height + "px;");
$("body.home h2").attr("style","margin-top:" + margintop + "px");
$(window).resize(function() {
// $('#log').append('<div>Handler for .resize() called.</div>');
var width = $(window).width();
var height = $(window).height();
if ((width > 320) && (width <= 480)) { height = height + 240; }
else if (width <= 320) { height = height + 80; }
var margintop = Math.round((height/3) - 120);
$("body.home #banner").attr("style","height:" + height + "px;");
$("body.home h2").attr("style","margin-top:" + margintop + "px");
});