只需要将1个图像放在顶部,第二个图像放在底部

时间:2010-09-10 17:37:30

标签: html css

我只需要将1个图像放在顶部,第二个图像放在背景的底部就可以了吗?请多多帮助我

html { background:url(../images/try.jpg) repeat-y top center; width:100%; height:100%;}

body {
    font: 100% Verdana, Arial, Helvetica, sans-serif;
    background:url(../images/try2.jpg) no-repeat bottom center;
    margin: 0;
    padding: 0;
    text-align: center; 
    color: #000000;
    height:100%;

}

1 个答案:

答案 0 :(得分:1)

CSS 3 ....

body {
    font: 100% Verdana, Arial, Helvetica, sans-serif;
    background: url(../images/try2.jpg) no-repeat bottom center,
                url(../images/try2.jpg) no-repeat bottom center;
    margin: 0;
    padding: 0;
    text-align: center; 
    color: #000000;
    height:100%;

}

但要使其跨浏览器,上面是treefrog的解决方案;)