首页 > 解决方案 > 无法定位第二张背景图片

问题描述

无法定位第二个背景图像

body {
margin: 0;
padding: 0;
color: #666464;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
font-size: 12px;
line-height: 1.4em; 

background-image: url( ../images/862a8380ba6984de1235023a8eef20e7.png), url(../images/green-heart-tree-PNG-thumb20.png);
background-position: top bottom, right top; 
background-repeat: no-repeat, no-repeat;

}

由于某种原因,我根本无法定位绿心,为什么?我不明白。谢谢你们的帮助。

标签: cssbackgroundbackground-position

解决方案


您将第一张图片的位置指定为topand bottom,这搞砸了。

body {
    margin: 0;
    padding: 0;
    color: #666464;
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    font-size: 12px;
    line-height: 1.4em; 

    background-image: url( ../images/862a8380ba6984de1235023a8eef20e7.png), url(../images/green-heart-tree-PNG-thumb20.png);
    background-position: top left, right top; 
    background-repeat: no-repeat, no-repeat;
}

推荐阅读