sIFR 3 r436 歌剧 + 火狐浏览器浮动问题

发布于 2024-07-30 03:30:04 字数 226 浏览 3 评论 0原文

我在将 sifr 放置在浮动 img 旁边时遇到问题,Opera 9.6 强制文本清除图像并显示在一行上。 Firefox 还会在第一次加载页面时强制清除文本,尽管刷新修复了这一点,并且该问题将永远不会再次发生,只有在清除缓存并重新启动浏览器时才会返回。

同样用firefox勒死,如果发生错误然后我加载firebug,这会将文本拍摄到与图像内联的正确位置,非常奇怪,因为我不认为firebug导致dom重新加载。

I’m having an issue with sifr placed next to a floated img, Opera 9.6 is forcing the text to clear the image and display on one line. Firefox is also forcing the text to clear the first time the page is loaded, although a refresh fix’s this and the problem will never occur again, only to return if cache is cleared and the browser restarted.

Also strangley with firefox, if the bug occurs and then i load up firebug, this shoots the text up to the correct position inline with the image, very strange as i did not think firebug caused the dom to reload.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光倒影 2024-08-06 03:30:04

这通常是一个时间问题。 当 sIFR 替换元素时,图像尚未加载,因此要替换的元素是容器的整个宽度。 sIFR 将插入此宽度的 Flash 影片,一旦所有内容正确渲染,该影片将无法与图像相邻。 当您打开 Firebug 时,您可以调整网页视口的大小。 这会触发 sIFR 中的大小调整,并导致 sIFR 检测被替换元素的正确宽度。

解决方案:

  • 尝试在图像上设置宽度高度,以便加载时布局不会改变
  • 使用fitExactly将Flash影片制作为与它包含的文本一样宽。 这将有助于防止清除,当然,除非文本长于可用空间
  • sIFR.activate() 之前设置 sIFR.useDomLoaded = false; 以使 sIFR 替换元素页面加载时 — 图像加载后

您可能还需要调整要替换的元素上的字母间距,以便 HTML 文本的宽度正确反映 Flash 文本将占用的宽度。 如果 Flash 报告的文本宽度值不正确,请使用 tuneWidthoffsetLeft 属性进行调整。

This is usually a timing issue. When sIFR replaces the elements, the image isn't yet loaded so the to-be-replaced element is the full width of the container. sIFR will insert a Flash movie of this width, which won't fit next to the image once everything is properly rendered. When you open Firebug, you resize the viewport of the web page. This triggers a resize in sIFR and causes sIFR to detect the proper width of the replaced element.

Solutions:

  • Try setting a width and height on the image so the layout doesn't change when it loads
  • Use fitExactly to make the Flash movie as wide as the text it contains. This will help prevent the clearing, unless of course the text is longer than the available space
  • Set sIFR.useDomLoaded = false; before sIFR.activate() to make sIFR replace elements on page load — after the image has been loaded

You might also need to adjust letter spacing on the to-be-replaced elements such that the width of the HTML text properly reflects the width that will be taken up by the Flash text. And in case Flash is reporting incorrect values for the text width, use the tuneWidth and offsetLeft properties to adjust.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文