在我的示例http://jsfiddle.net/cXbMb/中,我需要完全显示徽标图像,即标题图像必须部分透支。还有下一个要求:标题图片必须在标题下方 5 像素处开始。
<!DOCTYPE html>
<html><head></head>
<body>
<header>
<h1>Headline</h1>
<div></div>
</header>
</body>
</html>
body { padding: 0; margin: 0 auto; width: 400px; }
header {
background-image: url('http://placehold.it/100x50/ffff00&text=LOGO');
background-position: left top;
background-repeat: no-repeat;
}
header h1 { text-align: right; margin: 0 0 5px; padding: 0; font-size: 1em; }
header div {
background-image: url('http://placehold.it/400x100/0000ff&text=HEADER');
background-position: left top;
background-repeat: no-repeat;
height:200px;
}