【发布时间】:2012-11-23 08:30:28
【问题描述】:
我有这个代码:
body{
margin: 0px;
padding: 0px;
background-image: url(images/header.png), url(images/footer.png);
background-repeat: repeat-x, repeat;
background-height: 50px , 400px; /* ?? */
background-position: 0% 0%, 0% 100%;
}
我可以给 footer.png 指定一个高度以在该特定高度重复吗?
【问题讨论】:
-
我不确定我是否理解。 “在特定高度重复”是什么意思?
-
我的意思是第二个图像的高度为 200 px 或其他东西,但我需要重复该图像,但是当我重复时,图像将在我不需要的整个身体上重复:我需要背景以 x 100% 然后 400 px 或其他方式重复,我希望我现在清楚:)
-
最好创建单独的 div 并设置背景图像并设置该 div 的高度和宽度。
标签: css background