2012-11-22 224 views
-4

反正做css background-size:cover;放大120%?css背景大小缩放?

我尝试了很多时间,但仍然不工作。顶部/底部有灰色边框

如何去除灰色边框?

+5

可以u显示你的代码。 – Selvamani

回答

0

CSS:

html, body { 
    height: 100%; 
    width: 100%; 
    padding: 0; 
    margin: 0; 
} 

#full-screen-background-image { 
    z-index: -999; 
    min-height: 100%; 
    min-width: 1024px; 
    width: 100%; 
    height: auto; 
    position: fixed; 
    top: 0; 
    left: 0; 
} 

#wrapper { 
    position: relative; 
    width: 800px; 
    min-height: 400px; 
    margin: 100px auto; 
    color: #333; 
} 

HTML:

<body> 
    <img alt="full screen background image" src="/background.jpg" id="full-screen-background-image" /> 
    <div id="wrapper"> 
    <p>Content goes here...</p> 
    </div> 
</body>