HTML代码

<body id="body">
    <div class="info-wrapper">
        <div class="content">
        </div>
     </div>
</div>

CSS代码

body{
  font-size: 16px;
  font-family: Arial;
  max-width: 1920px;
  min-width: 1180px;
  margin:0 auto;
  overflow-y:scroll; 
}

.info-wrapper{
    position: absolute;
    margin: 0px;
    width: 100%;
    height: 560px;
    top: 1563px;
    text-align: center;
}

.content{
    width: 100%;
    height: 560px;
    margin: 0 auto;
    overflow: hidden;
    background: url(../images/index/background.png) no-repeat;
}

JS代码

var screenWidth=$(window).width();
            
$("#body").css("width",screenWidth);

 

相关文章:

  • 2022-12-23
  • 2022-01-06
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2022-01-04
猜你喜欢
  • 2022-12-23
  • 2021-12-30
  • 2021-06-27
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案