html,body{
height:100%; //关键
}

/*包裹其他所有div的div*/

#cover {
width:100%; //关键
height:auto;  //关键
border-radius: 10px;
background-size:100% auto;
background-repeat:no-repeat;
background-image: url('<%=basePath%>img/bg.jpg');
-webkit-background-size: cover;
-moz-background-size:cover;
-o-background-size: cover;
}

 

 

//其他内部div均设置为height:auto:从而实现自适应

 

文字自动换行:

word-break:break-all;

相关文章:

  • 2021-12-12
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
猜你喜欢
  • 2022-01-11
  • 2022-02-09
  • 2021-06-21
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
相关资源
相似解决方案