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

代码这为什么需要用上浮动?不用浮动元素出不来,我这样用对吗?请教各位高手指点一下说详细点

nbsp;HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">            模仿京东 *{  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;}      
 
@@##@@
     
    
    
        
    
        
        
    
    
        
        
        
    
   

登录后复制

回复讨论(解决方案)

 
.youbian .s{
 
         
        height: 70px;
        width: 310px;
        background: #1223a3;
float: left;
          
}
 
 
 
.youbian .s{
 
height: 133px;
width: 310px;
background: #616351;
 float: left;
}
 

你写了2个 .s

不用浮动也可以啊

不用浮动也可以啊

不浮动是出不来的 请教这里为什么需要用上浮动!_html/css_WEB-ITnose

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。

发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/3093450.html

(0)
上一篇 2025年3月28日 14:37:21
下一篇 2025年3月28日 14:37:28

AD推荐 黄金广告位招租... 更多推荐

发表回复

登录后才能评论