ol 下的LI浮动后没有序号BUG

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">  #nofloat li{border:1px solid red;background:#eee;margin:10px;}   #float li{float:left;border:1px solid red;background:#eee;margin:10px;
margin-left:20px;padding-left:20px;

}   </style> 
</head>

<body>
<p>现象:ol下面的li本来是带序号的,
但是要是想让li横向显示让它float:left的话,
它的序号在IE6,IE7中就会显示不出来,
在firefox中显示正常,有序号。</p>

<div id="nofloat">
 <ol>    <li>不float序号是没有问题的xxx1x</li>
   <li>xxx2x</li>
      <li>xxx3x</li>   
         <li>xxx4x</li>   
   </ol>
</div>
<div id="float">  
<ol><li>float就没有序号了xxx1x</li><li>xxx2x</li><li>xxx3x</li><li>xxx4x</li></ol></div> 
</body>
</html>

原文地址:https://www.cnblogs.com/yuzhongwusan/p/1211148.html