我就这样写为什么不行呢
我就这样写为什么不行呢
我就这样写为什么不行呢
2017-05-17
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>border实现等高布局</title>
<style type="text/css">
.clearfix:before, .clearfix:after{
display: table;
content: " ";
}
.clearfix:after{
clear: both;
}
h3{
margin: 0;
padding: 0;
border: 0;
font-size: 18px;
}
.box{
width: 300px;
font: bold 18px/50px "Microsoft YaHei";
border-left: 300px solid #333;
background-color: #eee;
}
.left{
float: left;
width: 300px;
line-height: 50px;
margin-left: -300px;
color: #ccc;
}
</style>
</head>
<body>
<div class="box clearfix">
<nav class="left">
<h3>导航1</h3>
</nav>
<section>
<div class="module">模块1</div>
<div class="module">模块1</div>
<div class="module">模块1</div>
</section>
</div>
</body>
</html>
希望对你们有帮助。
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>border</title>
<style>
.box{
border-left:300px solid #222;
}
.xa{
width:300px;
float:left;
margin-left:-300px;
}
.module{
line-height:60px;
background:#f00;
}
</style>
</head>
<body>
<div class="box">
<nav class="xa">
<h3>导航1</h3>
</nav>
<section class="module">
<div >模块1</div>
</section>
</div>
</body>
</html>
举报