视频的存在会影响 Safari 中的 Cufon 文本
网站:http://ghostpool.com/wordpress/slide/
如果您单击“+”按钮在左下角显示页脚,cufon 标题文本在 Safari 中快速移动或消失(使用 5.0.3)。其他浏览器中不会出现此问题。如果我删除滑块中第五张幻灯片中的视频或将其悬停在视频上,或者默认显示页脚且没有切换功能,则问题就会消失。这意味着 Safari 中的视频和 cufon 一定存在问题。感谢任何解决此问题的帮助。
Website: http://ghostpool.com/wordpress/slide/
If you click the "+" button in the bottom left corner to reveal the footer the cufon heading text quickly moves or disappears in Safari (using 5.0.3). The problem occurs in no other browser. If I remove or hover over the video from the fifth slide in the slider or show the footer by default with no toggle feature the problem goes away. This means there must be an issue with the presence of videos and cufon in Safari. Any help in fixing this issue is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在向 Cufon 的创建者询问此错误后,他回复了这个
https://github.com/sorccu/ cufon/issues/199
"
您好,我以前没有遇到过这种情况,但您可能想尝试将 z-index(几乎是除 auto 之外的任何值)添加到定位的 cufon 元素,而不是删除定位。它可能会起作用。或者,您可以尝试将 z-index 添加到视频本身(或者如果尚未定位,则将其定位)。
请让我知道进展如何。另外,我认为这个问题可能会影响画布。 Safari 团队可能会在他们这边修复它(迟早......)该网站上还有其他可能相关的问题,例如子菜单有时会部分呈现......请参阅附件(如果有效)。
下一个版本(1.10)实际上不再使用定位,所以我想这个问题可能会消失。但请不要问什么时候发布,因为我不知道。
-西莫
“
看来添加除 auto 之外的任何 z-index 值也可以解决此问题。使用position: static 过多地限制了 Cufon'd 文本的控制
我还发现它更容易使用,
而不是 GhostPool 建议的修复 。
我唯一不喜欢这些修复的地方是,如果您尝试在任何 cufon 块中嵌套 span 标签并尝试更改其位置属性,它会忽略 z-index 修复
After asking the creator of Cufon about this bug he replied with this
https://github.com/sorccu/cufon/issues/199
"
Hi, I haven't come across this before, but you might want to try adding z-index (pretty much any value other than auto) to the positioned cufon elements instead of removing the positioning. It just might do the trick. Alternatively, you could try adding z-index to the video itself (or making it positioned if it isn't already).
Please let me know how it goes. Also, I think that this issue probably affects canvases in general. The Safari team will probably fix it on their side (sooner or later..) There are also other possibly related issues on that site, for example the submenus are sometimes left partially rendered.. see attachment (if it works).
The next version (1.10) actually no longer uses positioning so I guess the issue might go away then. But please do not ask when it's going to be released because I have no idea.
-Simo
"
it appears that adding a z-index value of anything but auto will fix this issue as well. Using position: static limits the control of the Cufon'd text too much
I also found it simpler to use
instead of the fix that GhostPool suggested.
The only thing I do not like about either of these fixes is if you try to nest a span tag in any block of cufon and try to change its position attribute. It sort of ignores the z-index fix.
好吧,我已经通过 CSS 修复解决了这个问题。
默认情况下,cufon 文本被赋予一个position:relative,您需要使用position:static 来推翻它。将以下内容添加到您的样式表中。
将 h3 更改为您想要应用它的任何元素。您需要将position:relative样式重新添加到Internet Explorer,因为它不能很好地处理position:static。因此,将其添加到 IE 特定样式表中。
Ok I've managed to solve this issue with CSS fix.
The cufon text is given a position: relative by default, you need to overrule this with position: static. Add the following to your style sheet.
Change h3 to whatever element you want to apply it. You need to readd position: relative styling to Internet Explorer as it doesn't handle position: static too well. So add this to a IE specific style sheet.