本文介绍了Firefox 4不渲染a:visited :: before(except color)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Firefox 4中的特定网站制作了一个自定义样式表。在这里,我试图在我访问过的链接中添加红色'x'。现在,当我说的时候,我的意思是它以前工作了一段时间,在某些时候,这些'x停止出现(虽然其余的样式表工作正常)。

I'm making a custom stylesheet for a particular web site in Firefox 4. In it, I'm trying to prefix red 'x's to links that I've visited. Now, when I say making, I mean it used to work a while ago, and at some point, these 'x's stopped appearing (though the rest of the stylesheet works just fine).

现在,a:before(和a :: before,根据CSS3)工作正常。 a:参观工程罚款。

Now, a:before (and a::before, per CSS3) works fine. a:visited works fine. Neither a:visited:before nor a:visited::before works at all (well, almost).

在我的游戏测试中,我离开了一个:: before ,仍然有我的a:访问::前声明使用红色'x'。对于未访问的链接,a :: before内容是相同的文本颜色,但对于访问过的链接,:: before内容是正确颜色(红色)。

During my play-testing, I left in a::before, and still had my a:visited::before declaration to use red 'x's. For non-visited links, the a::before content was the same text color, but for visited links, the ::before content was the 'right' color (red).

这里有一个CSS的粘贴程序:

Here is a pastebin of the CSS at one point:http://pastebin.com/6Tzy1Q87

这里是一个屏幕截图CSS的结果:

And here is a screencap of what that CSS resulted in:http://i.stack.imgur.com/rtw9L.png

请注意,a ::之前简单地将内容指定为复选标记。

Notice that the a::before simply specifies the content to a checkmark. The a:visited::before should change the weight, color, and content, but only changes the color.

我听说过有关Firefox的最新安全功能,以及

I heard about a recent security 'feature' regarding Firefox and page history, but as I understood it, that would affect the regular a:visited selector as well.

推荐答案

选择器包括:visited 只允许在Firefox 4中更改颜色,是的。无论是否涉及 :: before ,都适用。请参阅

Selectors including :visited are only allowed to change colors in Firefox 4, yes. That applies whether or not ::before is involved. See http://dbaron.org/mozilla/visited-privacy

我会很好奇看到你有什么CSS允许你使用:visited 改变颜色以外的东西。

I'd be curious to see what CSS you had that allowed you to change something other than colors using :visited.

这篇关于Firefox 4不渲染a:visited :: before(except color)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 08:42