首页 > 代码库 > 左边定宽 右边自适应的写法

左边定宽 右边自适应的写法

<html>
<head>
<title>左边定宽 右边自适应</title>
<meta charset="utf-8">
<style type="text/css">
.left{float: left;width: 200px;margin-right: -100%}
.content{float: left;width: 100%;}
.contentInside{margin-left: 200px;}
</style>
</head>
<body>

<div class="left">left</div>
<div class="content">
<div class="contentInside">content</div>
</div>

<script type="text/javascript">

</script>
</body>
</html>

左边定宽 右边自适应的写法