首页 > Web开发 > 详细

CSS——标准盒子模型

时间:2017-05-04 01:03:31      阅读:418      评论:0      收藏:0      [点我收藏+]

在写网页的时候一般都先用Div把网页的框架搭好(用不同的背景颜色来区分不同的Div块),然后填充每一个Div,最后把每个Div的背景颜色去掉

    <html>

      <head>

        <title></title>

        <style type="text/css">

          .divIndex

          {
            width:1000px;height:800px;background-color:yellow;margin:0px auto;
          }
          .divLogo
            { width:1000px;height:100px;background-color:red;
          }
          .divContent
          {
            width:1000px;height:300px;background-color:Green;
          }
          .divPicture
          {
            height:300px;width:300px;background-color:Blue;float:left;
          }
          .divText
          {
            height:300px;width:700px;background-color:Purple;float:left;
          }

 

        </style>

      </head>

      <body>

        <div class="divIndex">

          <div class="divLogo">
            <img src="image/000.jpg" height="100px" alt="姊妹"/>
          </div>
          <div class="divContent">
            <div class="divPicture"></div>
            <div class="divText"></div>
          </div>

        </div>

      </body>

    </html>

CSS——标准盒子模型

原文:http://www.cnblogs.com/zhangchaoran/p/6804927.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!