margin外边距

来源:互联网 发布:从程序员到架构师 pdf 编辑:程序博客网 时间:2024/05/22 08:19
<!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <style>        div{            height:300px;            background-color: #cccccc;            margin-top: 20px;            margin-left: 20px;            margin-right: 20px;            margin-bottom: 20px;            /*两端对齐*/            text-align: justify;            /*上 右 下 左             margin: 30px 40px 50px 60px;             上右下左都一样             margin:20px;             上 左右 下             margin:20px 40px 50px;             上下 左右             margin:20px 40px*/        }        *{            padding: 0px;            margin: 0px;        }        p{            background-color: antiquewhite;            height: 300px;        }    </style>    <title>margin外边距</title></head><body><div>    笑的大方,走的坦荡。笑的大方,走的坦荡。笑的大方,走的坦荡。笑的大方,走的坦荡。笑的大方,走的坦荡。    笑的大方,走的坦荡。笑的大方,走的坦荡。笑的大方,走的坦荡。笑的大方,走的坦荡。笑的大方,走的坦荡。    笑的大方,走的坦荡。</div>    <p>笑的大方,走的坦荡</p></body></html>
                                             
0 0
原创粉丝点击