easy ui layout 高度 宽度自适应浏览器

2 篇文章 0 订阅
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
	String path = request.getContextPath();
	request.setAttribute("path", path);
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TTest</title>
<link rel="stylesheet" type="text/css" href="<%=path%>/themes/default/easyui.css">  
<link rel="stylesheet" type="text/css" href="<%=path%>/themes/icon.css">  
<script type="text/javascript" src="<%=path%>/js/jquery-1.8.0.min.js"></script>  
<script type="text/javascript" src="<%=path%>/js/jquery.easyui.min.js"></script> 

<script type="text/javascript">
	$(document).ready(function(){
		var height1 = $(window).height()-20;
		$("#main_layout").attr("style","width:100%;height:"+height1+"px");
		$("#main_layout").layout("resize",{
			width:"100%",
			height:height1+"px"
		});
	});
	
	
	$(window).resize(function(){
		var height1 = $(window).height()-30;
		$("#main_layout").attr("style","width:100%;height:"+height1+"px");
		$("#main_layout").layout("resize",{
			width:"100%",
			height:height1+"px"
		});
	}); 
</script>
</head>
<body>
<div style="margin-top:5px;margin-left:5px;margin-right:5px;margin-bottom:5px;">
	<div id="main_layout" class="easyui-layout"  style="width:100%; height:680px;">
		<!-- 北方 -->
		<div data-options="region:'north'" style="height: 40px;background-color:#95B8E7;">
			<span style="margin-left:0.5%;">
				<font size="3" style="line-height: 2.0em;" color="white" >
					<b>AAAAAAAAAAAAAAAAAAAAAAA </b>
				</font>
			</span>
	    	
	    	<span style="float:right;margin-top:10px;margin-right:20px;">
	    		<font size="3" color="white">欢迎 :Admin</font>    
	           	<a href="<%=path %>/loginOut.do" > <font size="3" color="red">退出</font> </a>
	        </span>
		</div>
		
		<!-- 西方 -->
		<div data-options="region:'west',split:true" title="BBBBBB" style="width: 200px;">
			<div class="easyui-accordion"  data-options="fit:true,border:false">
				
			</div>
		</div>
		<!-- 中间 -->
		<div data-options="region:'center',title:'CCCCCCC',iconCls:'icon-ok'">
			<div id="tTabs" class="easyui-tabs" data-options="fit:true,border:false,plain:true">
				<div title="DDDDD"
					data-options="closable:true,href:'<%=path%>/view/gmtool/welcome.jsp'"
					style="overflow: auto; padding: 20px;">
				</div>
			</div>
		</div>
		<!-- 南方 -->
		<div data-options="region:'south',split:true" style="height:30%;background-color:#95B8E7;">
			<div style="" align="center">
				<font size="" color="white">Copyright &copy; 2014 Beijing  Co., Ltd. All Rights Reserved 版权所有 </font>
			</div>
		</div>
	</div>
</div>
</body>
</html>
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值