<!DOCTYPE html> <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%> <% String path = request.getContextPath(); %> <html> <head> <meta charset="utf-8"> <title>...</title> <link rel="stylesheet" href="<%=path %>/static/layui/css/layui.css" media="all"/> <style> body{ margin:0; height:100%} html{ height:100%} /*兼容firefox的div高度100%*/ #left{ position:absolute; top:0; left:0; width:50%; height:100%; background-color:#CCCCCC} #right{ margin-left:200px; height:100%; background-color:#0099FF} </style> </head> <body> <div id="left"> </div> <div id="right"> </div> </body> </html>