字体影响浮动

设置了float:left后,页面显示却会在第三个li的地方靠右,最后是修改了字体才得以解决。很奇怪,所以记下。

修改前:

<ul style="width:100%;height:auto;padding:20px 0;text-align:left;display:block">
                
                <li class="fl" style="width:50%;overflow:hidden;">
                    
                </li>
                
            
            </ul>

css:

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
    margin:0;
    padding:0;
    font-size:62.5%;font-family: Arial,'Microsoft YaHei',SimHei,STHeiti,'Heiti SC',sans-serif; overflow-x:hidden; overflow-y:auto;
}

修改后:

css:

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
    margin:0;
    padding:0;
    font-size:62.5%;font-family:'Microsoft YaHei',SimHei,STHeiti,'Heiti SC',sans-serif; overflow-x:hidden; overflow-y:auto;
}

 

posted @ 2017-07-04 12:55  黑色白沙  阅读(249)  评论(0编辑  收藏  举报