直接上代码,拷贝出来可以直接运行
[code=php]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
.main{border-style: solid;border-color: blue;width:800px;height:600px;border-width: 1px}

.div1{border-style: solid;border-color: red;width:300px;border-width: 1px;
margin:5px;padding:8px;float: left}

.div2{border-style: solid;border-color: red;width:300px;border-width: 1px;
margin:-5px;padding:8px;float: right}
</style>
</head>

<body>
<div id="" class="main">
<div class="div1">外边距是正数</div>
<div class="div2">外边距是负数</div>
</div>

</body>
</html>
[/code]



更多文章请访问:wang153723482.blog.163.com