推下背景图片

时间:2011-06-20 12:26:01

标签: css

我有以下css,它将图像放在身体背景的顶部:

body {
    background:url("http://intranet/img/background-top.png") repeat-x top;
}

是否可以将此图像向下推约50px?

2 个答案:

答案 0 :(得分:13)

是:

body {
    background: url(whatever) repeat-x 0px 50px;
}

或:

body {
    background-image: url(whatever);
    background-position: 0px 50px;
    background-repeat: repeat-x;
}

答案 1 :(得分:3)

body {
    background:url("http://intranet/img/background-top.png") repeat-x left 50px;
}