Firefox 1.0和:之后 [英] Firefox 1.0 and :after

查看:69
本文介绍了Firefox 1.0和:之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚注意到Firefox 1.0中出现了一些奇怪的事情:似乎

:伪元素之后的效果并不像以前那么好。


请查看: http://www.relinquiere.com /test1.html


这是一个简单的图像列表(ul):我想使用这些图像显示标题

生成的内容,所以我使用了一个简单的规则:


img:after {content:attr(title); }


但这不起作用。


:之后仍然可以理解,你可以在
看到我生成的 http://www.relinquiere.com/test3.html 一个固定的字符串
$ li元素之后的b $ b。这是有效的。

原因不是动态生成的内容:
http://www.relinquiere.com/test4.html ,我在

li元素上使用内容:attr(title),它仍然有效。


http://www.relinquiere。 com / test2.html ,我试图在img之后生成一个固定的

字符串,但无济于事。所以问题似乎来自于

混合:img元素之后和生成的内容...


这不奇怪吗?或者我做错了什么?以上所有这些都是为了向Firefox 0.8提供
(它仍然适用于Opera 7),所以它是Firefox中的一个错误吗?


作为旁注,在test3和test4中,我使用

显示生成的内容block模式,但它出现在图像旁边。我希望

它在图像(或li)之下,因为它曾经...

感谢您的帮助,

Vincent。

-

想在法国度假吗?查看 http://www.relinquiere.com/

I''ve just noticed something strange in Firefox 1.0: it seems that the
:after pseudo-element doesn''t work as well as it used to.

Have a look at: http://www.relinquiere.com/test1.html

This is a simple list (ul) of images: I would like to display the titles
of these images using generated content, so I used a simple rule:

img:after { content: attr(title) ; }

but this doesn''t work.

:after is still understood, though, as you can see at
http://www.relinquiere.com/test3.html where I generate a fixed string
after the li element. This works.
The cause is not the dynamic generated content either: in
http://www.relinquiere.com/test4.html, I use content: attr(title) on the
li element and it still works.

In http://www.relinquiere.com/test2.html, I tried to generate a fixed
string after the img, to no avail. So the problem seems to come from
mixing :after and generated content on the img element...

Isn''t it weird? Or am I doing something wrong? All this used to work up
to Firefox 0.8 (and it still works in Opera 7), so is it a bug in Firefox?

As a sidenote, in test3 and test4, I display the generated content using
the "block" mode, but it appears just next to the image. I would expect
it to be under the image (or the li), as it used to...
Thanks for your help,

Vincent.
--
Want to spend holidays in France ? Check http://www.relinquiere.com/

推荐答案

Vincent Poinot写道:
Vincent Poinot wrote:
我刚刚注意到Firefox 1.0中出现了一些奇怪的事情:好像是
:after伪元素不像以前那样工作得好。

看看: http://www.relinquiere.com/test1.html

这是一个简单的图像列表(ul):我想显示标题
img:after {content:attr(title); }

但这不起作用。

:之后仍然可以理解,正如你所看到的那样 http://www.relinquiere.com/test3.html 我在哪里生成一个固定的字符串
李元素。这是有效的。
原因不是动态生成的内容:
http://www.relinquiere.com/test4.html ,我在
li元素上使用内容:attr(title),它仍然有效。

http://www.relinquiere.com/test2.html ,我试过在img之后生成一个固定的字符串,无济于事。所以问题似乎来自混合:img元素之后和生成的内容......

这不奇怪吗?或者我做错了什么?所有这些都用于Firefox 0.8(它仍然可以在Opera 7中运行),所以它是Firefox中的一个错误吗?

作为旁注,在test3和test4中,我显示使用块生成的内容。模式,但它出现在图像旁边。我希望
它可以在图像(或li)之下,因为它曾经...

感谢您的帮助,

Vincent。
I''ve just noticed something strange in Firefox 1.0: it seems that the
:after pseudo-element doesn''t work as well as it used to.

Have a look at: http://www.relinquiere.com/test1.html

This is a simple list (ul) of images: I would like to display the titles
of these images using generated content, so I used a simple rule:

img:after { content: attr(title) ; }

but this doesn''t work.

:after is still understood, though, as you can see at
http://www.relinquiere.com/test3.html where I generate a fixed string
after the li element. This works.
The cause is not the dynamic generated content either: in
http://www.relinquiere.com/test4.html, I use content: attr(title) on the
li element and it still works.

In http://www.relinquiere.com/test2.html, I tried to generate a fixed
string after the img, to no avail. So the problem seems to come from
mixing :after and generated content on the img element...

Isn''t it weird? Or am I doing something wrong? All this used to work up
to Firefox 0.8 (and it still works in Opera 7), so is it a bug in Firefox?

As a sidenote, in test3 and test4, I display the generated content using
the "block" mode, but it appears just next to the image. I would expect
it to be under the image (or the li), as it used to...
Thanks for your help,

Vincent.




没人,真的吗?

你不是遇到同样的问题吗?


-

想在法国度假吗?查看 http://www.relinquiere.com/


Vincent,


我看了你的例子,因为你报告的是在FF1.0中不起作用。

它也不适用于Mozilla 1.8b,但在Opera 8b中可以使用。我的b $ b看不出你的代码有什么明显的错误,但是我从来没有使用过

:之前/:之后或内容所以我可能错过了一些东西。我有点b / b
看着bugzilla但是找不到任何明显的东西。我建议你

创建一个更小的测试用例并将其存放在bugzilla中; Mozilla

开发人员会毫不怀疑地发现你在做什么导致

这个问题。


- Phil。

Vincent,

I looked at your example and as you report is doesn''t work in FF1.0.
It also doesn''t work in Mozilla 1.8b, but does work in Opera 8b. I
can''t see anything obvious wrong with your code, but I have never used
:before/:after or content so I may have missed something. I have
looked in bugzilla but can''t find anything obvious. I suggest that you
create an even smaller test case and file it in bugzilla; the Mozilla
developers will tell no doubt find what you''re doing that is causing
the problem.

--Phil.


2005年2月26日星期六13:07:28 +0100,Vincent Poinot写道:
On Sat, 26 Feb 2005 13:07:28 +0100, Vincent Poinot wrote:
这是一个简单的图像列表(ul):我想使用生成的内容显示这些图像的标题,所以我使用了一个简单的规则:
img:after {content:attr(title) ); }
This is a simple list (ul) of images: I would like to display the titles
of these images using generated content, so I used a simple rule:
img:after { content: attr(title) ; }




好​​吧,这对我没有多大帮助,但是:看似工作正常

带链接,例如on这个网站: http://justinfrench.com/

它看起来好吧,我的FF 1.0 / Linux。但是,无法帮助你。



OK, this is not of much help, I guess, but :after seems to work fine
with links, for example on this site: http://justinfrench.com/
It looks alright on my FF 1.0/Linux. Can''t help you more, however.


这篇关于Firefox 1.0和:之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆