左边和右边固定,中间自适应

HTML5+CSS3 1803 0 2014-04-21

左边和右边固定,中间自适应
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">       
<meta content="yes" name="apple-mobile-web-app-capable">       
<meta content="black" name="apple-mobile-web-app-status-bar-style">       
<meta content="telephone=no" name="format-detection">
<title>无标题文档</title>
<style type="text/css">
body{margin:0;padding:0}
.wrap{ width:100%; float:left}
.content{ height:200px;background:green; margin-left:100px;margin-right:100px}
.left{ width:100px; height:200px; float:left; background:yellow; margin-left:-100%}
.right{ width:100px; height:200px; background:red; float:left; margin-left:-100px}
</style>
</head>
<body>
<div class="wrap">
<div class="content">content</div>
</div>
<div class="left">aside1</div>
<div class="right">aside2</div>
</body>
</html>

上一篇:左边固定,右边自适应(圣杯布局的实现)

下一篇:html5中文本框输入内容提示消失

讨论数量:0

请先登录再发表讨论。 2024-04-25

天涯网魂
3 杠 5 星
TA 的文章
TA 的随言
TA 的资源链