yvesliao

网页自动适应浏览器

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
       
<title>网页自动适应浏览器</title>
</head>
<body style="margin: 0px;" onResize="setHeight()" onLoad="setHeight()">
       
<div id="div1" style="background-color: Red;">
       
</div>

       
<script type="text/javascript">
       
function setHeight()
       
{
           document.getElementById(
"div1").style.height=document.body.clientHeight;
       }

       
</script>

</body>
</html>

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-08-31
  • 2021-10-27
  • 2021-11-25
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-06
  • 2022-12-23
  • 2021-08-10
  • 2022-01-03
  • 2021-09-04
  • 2021-12-05
相关资源
相似解决方案