wmode - 它在浏览器的渲染行为中意味着什么?
对象标签和 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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=opaque
和mode=transparent
都遵循非常相似的渲染路径。然而,它们比wmode=window
慢,因为浏览器必须检查元素以查看它们是否渲染在电影上方并在每个帧上渲染它们。请注意,wmode=transparent
比wmode=opaque
因为它还必须渲染底层内容以及叠加内容。那么,按照表现顺序...
wmode
is a parameter exclusive to<embed>
tag referring to Flash movies. The default value iswmode=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.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.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.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
andmode=transparent
both follow very similar rendering paths. They are however slower thanwmode=window
because the browser has to check elements to see if they render above than the movie and render them on each frame. Note thatwmode=transparent
is slower thanwmode=opaque
since it has to also render underlying content as well as superposing content.So, in order of performance...