码迷,mamicode.com
首页 > Web开发 > 详细

DIV+CSS实现两边固定宽度,中间自适应宽度

时间:2017-05-25 01:21:10      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:body   utf-8   ext   style   type   doctype   round   oat   doc   

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>DIV+CSS实现两边固定宽度,中间自适应宽度</title>
<style type="text/css">
.left, .right{ width: 100px; height: 100px; background-color: brown;}
.center{ height: 100px; background-color: gray; margin: 0 110px;}
.left{ float: left; margin-right: 3px;}
.right{ float: right; margin-left: 3px;}
</style>
</head>
<body>
<div class="left"></div>
<div class="right"></div>
<div class="center"></div>
</body>
</html>

DIV+CSS实现两边固定宽度,中间自适应宽度

标签:body   utf-8   ext   style   type   doctype   round   oat   doc   

原文地址:http://www.cnblogs.com/HanselHblog/p/6901640.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!