好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

请教这里为什么需要用上浮动!_html/css_WEB-ITnose

代码这为什么需要用上浮动?不用浮动元素出不来,我这样用对吗?请教各位高手指点一下说详细点
                 模仿京东    *{  margin: 0px;  padding: 0px;}    .top{            width:100%;            height: 30px;            background: #eee;        }   #ad{    margin: 0 auto;    display:block;    margin-top: 10px;  }    .sousuo{        width: 1210px;        height: 90px;        background: #1f5aa8;        margin: 0 auto;        margin-top: 10px;    }    .daohang{            width: 1210px;            height: 40px;            background: #666;            margin: 0 auto;            margin-top: 10px;    }    .main{                height: 410px;        width: 1210px;        border: 2px solid orange;        margin: 10px auto;    }    .main .zuobian{        background: #DB7093;        height: 410px;        width: 209px;        float: left;    }    .zhongjian{                width: 690px;        height: 410px;        float: left;        /*margin:2px;*/        background: #D8BFD8;            }    .zhongs{            width: 671px;            height: 240px;            background: red;            margin-left:10px;                }    .zhongx{            width: 671px;            height: 150px;            background:#0096ff;              margin-left: 10px;                }.youbian{        height: 410px;    width: 310px;    background: #315a63;    float: left;}.youbian .s{                height: 70px;        width: 310px;        background: #1223a3;float: left;         }.youbian .s{height: 133px;width: 310px;background: #616351; float: left;}.youbian .z{    height: 137px;    width: 310px;    background: #0096ff;     float: left;}.youbian .x {    height: 137px;    width: 310px;    background: #e4e4e4;    float: left;}         

查看更多关于请教这里为什么需要用上浮动!_html/css_WEB-ITnose的详细内容...

  阅读:33次