【发布时间】:2020-02-13 21:13:43
【问题描述】:
我目前正在一个网站上工作,我正在尝试以这种方式使用 CSS :before 伪类和 + 选择器在我的导航栏中创建链接分隔符:
/* Targets list items with a list item before it, so that we don't put separators
before the first element, nor after the last element. */
nav li + li:before{content:url('someimagehere.gif');}
如果我不使用图像,并且使用诸如“/”之类的字符串,它在 IE(以及 Chrome、Firefox 等)中可以正常工作。但是,它是使用单独在 IE 中失败的图像(Chrome 和 Firefox 工作正常)。有想法该怎么解决这个吗?任何帮助表示赞赏!
更新:我刚刚发现上述规则在 IE 中被覆盖,但仅在 IE 中。所有其他浏览器似乎都可以很好地呈现它,而 IE 拒绝这样做,即使有 !important 声明。
【问题讨论】:
-
ie9 还是 ie10?你的浏览器是什么
-
我正在 IE9 中进行测试,我正在使用开发工具查看它在 IE8 和 IE7 中的渲染效果。
标签: html css internet-explorer