Html 创建一个无论屏幕大小都可以缩小和放大的网站

Html 创建一个无论屏幕大小都可以缩小和放大的网站,html,css,aspect-ratio,Html,Css,Aspect Ratio,我正在我的mac book 13英寸上创建一个网站。我尝试使用的背景图像对于我的屏幕来说太大了,这是一种在我的屏幕上开发时保持纵横比不变的方法,因此它看起来是一样的放大或缩小 我用这个代码缩放背景图像以填充整个屏幕 background: url(images/background.jpg) no-repeat center center fixed; background-size: cover; background-size: cover; background-

我正在我的mac book 13英寸上创建一个网站。我尝试使用的背景图像对于我的屏幕来说太大了,这是一种在我的屏幕上开发时保持纵横比不变的方法,因此它看起来是一样的放大或缩小

我用这个代码缩放背景图像以填充整个屏幕

background: url(images/background.jpg) no-repeat center center fixed; 
    background-size: cover;
    background-size: cover;
    background-size: cover;
    background-size: cover;
我使用了一个换页来包装内容

#wrapper {margin: 0 auto 0 auto; width:1070px;height:auto;
但它只是重叠在图像上,这是不可能发生的定量是关闭的,因为包装的宽度与留给它的空间相同,但它重叠在背景图像上是1772x1240绿色框的宽度是1070,这是他们设计和保持这些比例的一种方法

background:url(images/background.jpg) 0 0 no-repeat; 
background-position:fixed;background-size:100%;

我并不是专门针对需求的,但若你们真的在寻找可重用的布局,那个么请遵循以下步骤。它适用于所有现代浏览器

HTML

  <div class="table">
    <div class='row'>
      <div class='cell'>1</div>
      <div class='cell'>2</div>
      <div class='cell'>3</div>
      <div class='cell'>4</div>
    </div>
  </div>

另外,尝试调整页面大小

您是否可以在JSFIDLE上发布您的问题的代码示例?这在某种程度上与表中一样有效,但我希望bacground图像具有这种性质,我还没有足够的尊重点来发布图像
  .table{
     height: 50px;
     width:100%;
     background-color:Red;
     display:table;
     table-layout:fixed;
  }
  .row{
     display:table-row
  }
  .cell{
     display:table-cell;
     line-height:50px;
     text-align:center;
  }