div自适应布局

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OnlineShowPage.aspx.cs"
Inherits="RM.Web.OnlineCheck.OnlineShowPage" %>

<!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 runat="server">
<title></title>
<style type="text/css">
html, body
{
margin: 0;
height: 100%;
}
#containt
{
height: 100%;
}
form
{
height: 100%;
}

#containt div
{
float: left;
height: -moz-calc(100% - 0px));
height: -webkit-calc(100% - 00px);
height: calc(100% - 0px);
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="containt">
<div style="width: 20%; background-color: Red;">
</div>
<div style="width: 80%; background-color: Blue;">
</div>
</div>
</form>
</body>
</html>

  

posted on 2016-07-19 21:24  wolf12  阅读(646)  评论(0编辑  收藏  举报