本文介绍了wmode - 浏览器的渲染行为是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

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

谢谢

解决方案

wmode 是一个独立于参考Flash影片的< embed> 标签的参数。默认值是 wmode = window


$ b

wmode = window wmode = window 时,Flash影片不会呈现在页面中。而是显示在一个单独的窗口中,而不是浏览器内容(用Spy ++或进行检查)。此模式将具有最佳性能,因为浏览器无需在每个框架上重新绘制页面的一部分。但是,此模式可防止您将内容显示在Flash影片的上方或下方。




  • 最佳效果

  • 在单独窗口中呈现
  • 不透明背景

  • 不允许低于内容

  • 允许以上内容



wmode =不透明



wmode = opaque 时,Flash电影会呈现为页面的一部分。没有为电影创建窗口。该电影将在发布过程中以背景色进行渲染,并且不会有任何内容被隐藏。在每一帧中,电影上方显示的内容都必须由浏览器重新绘制,从而影响效果。


  • 良好的性能

  • 作为页面的一部分呈现
  • 不透明背景

  • 不允许下面的内容

  • 允许上面的内容



wmode = transparent



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


  • 公平表现

  • 呈现为页面的一部分

  • 透明背景

  • 允许下面的内容

  • 允许上面的内容






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

wmode FLASH only属性?

是, wmode 仅适用于< embed> 标签嵌入一部Flash影片。



不同值之间对性能的影响是什么?

wmode = window 将具有最佳性能,因为Flash影片与页面本身完全分开。浏览器无需刷新,也不需要计算出现在Flash影片上的内容的z-index位置,因为此模式下的Flash影片呈现在完全独立的窗口中(可以使用Spy ++进行检查)。



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



所以,为了表现...

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

WINDOW OPAQUE透明


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

解决方案

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

这篇关于wmode - 浏览器的渲染行为是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 18:36