【兼容】ul float:left;加display:inline; ie6ie7 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=utf-8" />
<title>无标题文档</title>
</head>

<body style="margin:0; padding:0;">
<ul style="display:inline; float:left; margin:0; margin-left:10px; padding:0; background-color:#f00; list-style:none;">
    <li>1</li>
    <li>2</li>
    <li>3</li>
</ul>
<div style="display:inline; float:left; margin-left:10px; background-color:#ff0;">
    <ul style="margin:0; padding:0; list-style:none;">
        <li>1</li>
        <li>2</li>
        <li>3</li>
    </ul>
</div>
</body>
</html>

原文地址:https://www.cnblogs.com/jzm17173/p/2593229.html