wmode - 它在浏览器的渲染行为中意味着什么?

发布于 2024-11-16 09:41:27 字数 120 浏览 0 评论 0原文

对象标签和 iframe 标签中的 Wmode。

关于使导航在 Flash 页面等中正常工作有很多讨论

。- 请有人详细解释一下属性的实际作用。任何级别的技术细节都被接受。

谢谢

Wmode in object tags and iframe tags.

There are many discussions on making navigation to work properly in flash pages etc etc.

-
Someone please explain with details on what attribute does in actual. Any level of technical details is accepted.

Thank you

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

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

发布评论

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

评论(1

舟遥客 2024-11-23 09:41:27

wmode 是指 Flash 影片的 标签独有的参数。默认值为wmode=window

wmode=window

wmode=window 时,Flash 影片不会在页面中呈现。相反,它显示在与浏览器内容不同的单独窗口中(使用 Spy++ 或 WinSpy++ 检查)。此模式将具有最佳性能,因为浏览器不必在每个帧上重绘页面的一部分。但是,此模式会阻止您将内容显示在 Flash 影片的上方或下方。

  • 最佳性能
  • 在单独窗口中渲染
  • 不透明背景
  • 不允许下面的内容
  • 不允许上面的内容

wmode=opaque

wmode=opaque 时,Flash 影片将作为页面。没有为影片创建窗口。影片将使用发布过程中设置的背景颜色进行渲染,并且后面不允许有任何内容。在每一帧上,出现在电影上方的内容都必须由浏览器重新绘制,从而影响性能。

  • 性能良好
  • 作为页面的一部分呈现
  • 不透明背景
  • 不允许下面的内容
  • 允许上面的内容

wmode=transparent

wmode=transparent 时,Flash 影片将作为页面的一部分呈现页。没有为影片创建窗口。影片的背景颜色将是透明的。因此,电影的任何非不透明部分都将允许显示底层内容。在每一帧上,出现在电影上方和下方的内容都必须由浏览器重新绘制,从而极大地影响性能。

  • 公平性能
  • 作为页面的一部分呈现
  • 透明背景
  • 允许下面的内容
  • 允许上面的内容

编辑: 以下是您其他问题的答案...

wmode 是 FLASH仅有属性?
是的,wmode 仅在嵌入 Flash 影片的 标记中可用。

不同值对性能有何影响?
wmode=window 将具有最佳性能,因为 Flash 影片与页面本身完全分开渲染。浏览器不必刷新也不必计算出现在 Flash 影片上的内容的 z 索引位置,因为此模式下的 Flash 影片是在完全独立的窗口中呈现的(可以使用 Spy++ 检查)。

wmode=opaquemode=transparent 都遵循非常相似的渲染路径。然而,它们比 wmode=window 慢,因为浏览器必须检查元素以查看它们是否渲染在电影上方并在每个帧上渲染它们。请注意,wmode=transparent
wmode=opaque 因为它还必须渲染底层内容以及叠加内容。

那么,按照表现顺序...

FASTEST ----------------------------- SLOWEST

WINDOW             OPAQUE         TRANSPARENT

wmode is a parameter exclusive to <embed> tag referring to Flash movies. The default value is wmode=window.

wmode=window

When wmode=window, the Flash movie is not rendered in the page. It is instead displayed in a separate window than the browser content (as inspected with Spy++ or WinSpy++). This mode will have the best performance as the browser does not have to redraw a portion of the page on each frame. However, this mode prevents you from having content appear above or below the Flash movie.

  • Best Performance
  • Rendered in separate window
  • Opaque background
  • Doesn't allow content below
  • Doesn't allow content above

wmode=opaque

When wmode=opaque, the Flash movie is rendered as part of the page. No window is created for the movie. The movie will be rendered with the background color set during the publishing process and no content will be allowed behind. On each frame, content which appear above the movie will have to be redrawn by the browser, thus affecting performance.

  • Good Performance
  • Rendered as part of the page
  • Opaque background
  • Doesn't allow content below
  • Allows content above

wmode=transparent

When wmode=transparent, the Flash movie is rendered as part of the page. No window is created for the movie. The background color of the movie will be transparent. Thus, any non-opaque section of the movie will allow underlying content to display. On each frame, content which appear above and below the movie will have to be redrawn by the browser, thus greatly affecting performance.

  • Fair Performance
  • Rendered as part of the page
  • Transparent background
  • Allows content below
  • Allows content above

EDIT : Here are the answers to your additional questions...

Is wmode a FLASH only attribute?
Yes, wmode is only available in <embed> tags embedding a Flash movie.

What are the impacts on performance between the different values?
wmode=window will have the best performance as the Flash movie is rendered completely separately from the page itself. The browser does not have to refresh nor calculate the z-index position of content appearing over the Flash movie since the Flash movie in this mode is rendered in a completely separate window (as can be inspected with Spy++).

wmode=opaque and mode=transparent both follow very similar rendering paths. They are however slower than wmode=window because the browser has to check elements to see if they render above than the movie and render them on each frame. Note that wmode=transparent is slower than
wmode=opaque since it has to also render underlying content as well as superposing content.

So, in order of performance...

FASTEST ----------------------------- SLOWEST

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