`
jojo_java
  • 浏览: 94000 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

Div高度自适应二

    博客分类:
  • UI
阅读更多
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>自适应窗口高度</title>
<style>
* {
	padding:0;
	margin:0;
}
html {
	height:100%;
	width:100%;
	overflow:hidden;
}
body {
	height:100%;
	width:100%;
}
#left {
	position:absolute;
	width:200px;
	height:100%;
	left:0;
	top:0;
	background:#0099CC;
}
#map {
	position:relative;
	margin-left:200px;
	height:100%;
	background:#009933;
}
</style>
</head>
<body>
<div id="left"></div>
<div id="map">拉动改变窗口的大小试试</div>
</body>
</html>

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics