【发布时间】:2011-02-18 13:53:38
【问题描述】:
我有一个在 HTML 页面中使用子选择器的 CSS 样式,如下所示:
<html>
<head>
<title>MSO Bug</title>
<style type="text/css" media="screen,print">
ol{list-style-type:decimal;}
ol > ol {list-style-type:lower-alpha;}
ol > ol >ol {list-style-type:lower-roman;}
</style>
</head>
<body>
<div>
<ol>
<li><div>level1</div></li>
<ol>
<li><div>level2</div></li>
<ol>
<li><div>level3</div></li>
</ol>
</ol>
</ol>
</div>
</body>
</html>
在 Firefox 中,CSS 工作正常 - 第一个列表级别以“1”开头,第二个以“a”开头,第三个以“i”开头。
但这在 IE7/8 中不起作用!
(我知道后代选择器 - 由于某种原因我不能在这里使用它)
【问题讨论】:
-
MatW - 我将所有列表项目符号都设为“1”。编辑以包含整个页面。
-
你试过没有选择器之间的空格吗?
ol>ol而不是ol > ol?
标签: css internet-explorer-8 internet-explorer-7 css-selectors