我在我们的一个新网站上遇到列表菜单问题。
我正在使用 li:before 来显示 |在菜单中的所有元素之前。使用以下 CSS:
#menu li:first-child:before {
content:"";
}
#menu li:before {
content: " | ";
}
出于某种奇怪的原因,这在我之前做过的网站上运行良好:http://www.oneillsbedandbreakfast.com但它不适用于我目前正在使用的网站:http://www.scoridcottage.com/newdesign
有什么想法吗?
最佳答案
对于 :before
在 Internet Explorer 8 中工作,<!DOCTYPE>
必须设置。在您的网站中,注释出现在文档类型之前。这会导致某些浏览器出现奇怪的行为。
关于html - 李 :before not showing in IE8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15252462/