Home >Web Front-end >HTML Tutorial >Several situations and solutions when div is blocked by iframe
This article introduces you to some situations where p is blocked by iframe, as well as the solutions after being blocked. Friends in need can refer to it.
Similar structure:
The code is as follows:
The first type: the transparent background is covered
When p uses a transparent background, no matter it is used (opacity or rgba format), except chrome, other browsers
Solution:
Use opaque background or use transparent background image
## Two types: Z-index is invalid in IE8
In IE, introducing video video playback in iframe will cause the z-index of p to be invalid, that is, no matter what the z-index of p is set to, , all covered by iframe. SourceSolution:Add a parameter wmode=opaque to the iframe address. If the address is: http://caibaojian.com, then change it to: http. ://caibaojian.com?wmode=opaque. Flash is behind other elementsIn addition, I saw that flash also has this z-index failure problem, and also adds the above one to flash. ParameterThe code is as follows:orThe code is as follows: