[Html/css]div shown above object, embed ~

Source: Internet
Author: User

Introduction

Help a friend to get the front-end layout, everything is normal, but embedded object, Div is always under the object, the Internet to find a solution, here record, as if only for flash effective.

Insert a flash (such as Youku's video) with embed, and the result will always cover the other elements. It is useless to change the z-index of other elements into great.
The existing solution is to add the "wmode" attribute to the embed or object tag inserted into Flash and set it to wmode= "transparent" or "opaque", but what is the meaning of the Wmode attribute and why is it possible to solve the problem?
Window Mode (wmode)
Wmode that there are three types of window mode, look at the Macromedia Official Statement: Window mode, opaque mode, transparent mode

Window mode

By default, the display mode, in which Flash Player has its own window handle, means that the Flash movie is a display instance that exists in Windows and is on top of the browser's core display window, so flash just looks like it appears in the browser, But this is also the fastest and most efficient rendering mode for Flash. Since he is a browser-independent HTML rendering surface, this results in the default display in which Flash will always obscure all the DHTML layers where the location coincides with him. But most Apple browsers will allow the DHTML layer to appear on top of flash, but when the Flash movie is playing it can be tricky, such as the DHTML layer showing the exception as if it were scraped off by Flash.

Opaque mode

This is a windowless mode, in which case Flash Player does not have its own window handle, which requires the browser to tell Flash Player when and where to draw the render surface of the browser. In this case, the Flash movie will not be higher than the browser HTML rendering surface but with other elements on the same page, so you can use the Z-index value to control the DHTML element is obscured flash or obscured.

Transparent mode

Transparent mode, in this mode, Flash Player will have the background color alpha value of stage 0 and will only draw the real visible object on the stage, and you can also use Z-index to control the depth value of the Flash movie. However, unlike opaque mode, this reduces the playback effect of the Flash movie, and the Flash Player version setting wmode= "opaque" or "transparent" before 9.0.115 causes full-screen mode to fail.

Summarize

Adding a wmode= "transparent" property or wmode= the "opaque" property is recommended to use wmode= "opaque" because wmode= "transparent" can affect flash performance.

Original address: http://shicaolang1990.blog.163.com/blog/static/20391507720136124128715/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.