<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="jQuery/jquery-1.8.2.min.js"></script>
<style>
*{
margin:0;
padding:0;
}
.main_wrap{
background: #000;
width: 100%;
height:100%;
overflow: auto;
}
.main{
height:1000px;
color:#fff;
}
</style>
<script>
/*********** main_wrap_screen_height jquery begin(判断屏幕高度) ***********/
$(function(){
var windowHeight = $(window).height();
$('.main_wrap').css('height', windowHeight);
});
/************ main_wrap_screen_height jquery end(判断屏幕高度) ************/
</script>
</head>
<body>
<div class="main_wrap">
<div class="main">
123123123123
</div>
</div>
</body>
</html>
jQuery响应式布局
最新推荐文章于 2024-07-15 10:25:50 发布