码迷,mamicode.com
首页 > 其他好文 > 详细

盒子模型

时间:2016-07-31 19:15:34      阅读:92      评论:0      收藏:0      [点我收藏+]

标签:

 

<style type="text/css">

/*
    盒子模型: 盒子模型就是把一个html边框比作成了一个盒子的边框,盒子模型要做用于操作数据与边框之间的距离或者 是边框与边框之间的距离。
    
    
    盒子模型主要是用于操作内边距(padding)与外边距(margin)
    
*/    
    div{
        border-style:solid;
        width:100px;
        height:100px;
        /* 内边距 */
        padding-left:10px;
        padding-top:20px;        
    }
    
    .one{
        margin-bottom:30px;
    }


    .two{
        margin-left:700px;
    }



</style>

 

<body>
    <div class="one">
        这个是一个div
    </div>
    
    <div class="two">
        这个是二个div
    </div>
</body>

 

盒子模型

标签:

原文地址:http://www.cnblogs.com/linst/p/5723479.html

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