-4

无论如何做 css background-size:cover; 缩放 120%?

我尝试了很多次但仍然没有工作..

背景尺寸:封面;顶部/底部有灰色边框

如何去除灰色边框?

4

1 回答 1

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>
于 2012-11-22T09:59:51.543 回答