【发布时间】:2012-12-18 00:38:07
【问题描述】:
HTML:
#backgroundproduct {
position: fixed;
top: 5%;
left: 5%;
width: 90%;
height: 90%;
z-index: 12;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-position: top;
}
<div id="backgroundproduct" style="background-image: url(http://example.com/example.jpg)">
我使用图片作为背景图片,只有图片的下部比顶部更重要。
我怎样才能让背景上升一点?
【问题讨论】:
-
背景位置可以接受两个基于像素或百分比的数字。
-
还有没有办法“缩小”
-
背景尺寸也接受基于像素的数字
标签: html css background-image