2011-03-31 20 views
0

我想直接在另一个PNG上堆叠PNG。第一个PNG(logo2)旨在直接放置在第二个PNG(表单2)的顶部 - 两者都要居中。我调整了一切,并且我似乎仍然忽略了一些重大的事情,这些事情会让我得到我需要的东西。我的代码是这样的:以基本HTML页面为中心堆叠CSS

html{ 
    background: url(images/bg4.jpg) no-repeat center center fixed; 
    -webkit-background-size: cover; 
    -moz-background-size: cover; 
    -o-background-size: cover; 
    background-size: cover; 
    } 

    #main{ 
    background: url(images/logo2.png) 0 0 no-repeat; 
    margin: 8% auto 0 auto; 
    padding: 138px 71px 0 142px; 
    width: 1014; 
    height: 228px; 
    position: relative; 
    } 


    #main form { 
     margin: 13% auto 0 auto; 
     width: 806px; 
     height: 262px; 
     background: url(images/form2.png) 0 0 no-repeat; 
     position: relative; 
    } 

会比较谨慎,我不换我的形式围绕主,或者是我的错,我的保证金/填充?

谢谢!

回答