css盒子布局

* {

        margin: 0px;

        padding: 0px;

    }

    body {

        font-size: 12px;

        margin: 0px auto;

        height: auto;

        width: 805px;

    }

    .mainBox {

        border: 1px dashed #0099CC;

        margin: 3px;

        padding: 0px;

        float: left;

        height: 300px;

        width: 192px;

    }

    .mainBox h5 {

        float: left;

        height: 20px;

        width: 179px;

        color: #FFFFFF;

        padding: 6px 3px 3px 10px;

        background-color: #0099CC;

        font-size: 16px;

    }

    .mainBox p {

        line-height: 1.5em;

        text-indent: 2em;

        margin: 35px 5px 5px 5px;

    }

    .mainBox::before{

        content: '';

        clear: both;

    }


©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 深入理解傅里叶变换Mar 12, 2017 这原本是我在知乎上对傅立叶变换、拉普拉斯变换、Z变换的联系?为什么要进...
    价值趋势技术派阅读 11,070评论 2 2
  • 不会用代码框,所以看着有些乱套,,,,html部分 <!DOCTYPE html> 迅雷看看 ...
    这就是个帅气的名字阅读 5,480评论 0 0
  • 1、垂直对齐 如果你用CSS,则你会有困惑:我该怎么垂直对齐容器中的元素?现在,利用CSS3的Transform,...
    kiddings阅读 8,391评论 0 11
  • 1. tab列表折叠效果 html: 能源系统事业部 岗位名称: 工作地点 岗位名...
    lilyping阅读 5,887评论 0 1
  • 朋友从外地来我所在的城市发展,我知道消息的时候,她已经坐在了一家小饭馆里等我。我责怪她不早告诉我,好让我去接站,帮...
    心情故事阅读 3,838评论 0 51