当前位置:首页 >设计资讯> 正文

左侧固定,右侧宽度100%自适应

文章来源: 发布时间: 2017-12-24

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>左侧固定,右侧宽度100%自适应</title>
<style type="text/css" media="screen">
<!--
body {margin:0;padding:0;}
.right {margin-left:200px; background:#FC0}
.left {width:200px;position:absolute;top:0;left:0; background:#096}
-->
</style>
</head>
<body>
<div class="left">左侧宽度200p</div>
<div class="right">右侧宽度100%</div>
</body>
</html>