2012-07-20 72 views
1

近日gametrailers從改變了自己的嵌入代碼:覆蓋不透明的div的iframe

<embed width="960" height="540" src="http://media.mtvnservices.com/mgid:moses:video:gametrailers.com:722265" quality="high" bgcolor="000000" name="efp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="autoPlay=false" allowfullscreen="true"></embed> 

<iframe src="http://media.mtvnservices.com/embed/mgid:arc:video:gametrailers.com:0a115b6c-2d82-4a8c-b08b-4b6975e4c0dc" width="960" height="540" frameborder="0"></iframe> 

新的嵌入代碼是一樣的youtube iframe,它覆蓋我的收藏夾。

隨着舊的嵌入代碼,我能夠增加wmode參數,並使其留在div下方:

<embed wmode="opaque" width="960" height="540" src="http://media.mtvnservices.com/mgid:moses:video:gametrailers.com:722265" quality="high" bgcolor="000000" name="efp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="autoPlay=false" allowfullscreen="true"></embed> 

但新的代碼不允許我做任何事情,以保持以下的iframe,確實任何人都知道這個解決方案或我錯過了一些隱藏的參數?

+0

使用z-index&位置對父div的絕對或相對位置 – SVS 2012-07-20 09:09:11

+0

@SVS在chrome中沒有影響 – 2012-07-20 09:50:41

回答

1

臨時解決

這是舊的URL嵌入:

http://media.mtvnservices.com/mgid:moses:video:gametrailers.com:722265 

這是iframe中的新網址:

http://media.mtvnservices.com/embed/mgid:arc:video:gametrailers.com:0a115b6c-2d82-4a8c-b08b-4b6975e4c0dc 

作爲一個臨時的解決辦法,我改變了iframe網址,我發現通過隨機調整的iframe網址這個不確定的URL和嵌入,而不是使用iframe中這樣的:

http://media.mtvnservices.com/mgid:arc:video:gametrailers.com:0a115b6c-2d82-4a8c-b08b-4b6975e4c0dc 

它看起來像這樣:

<embed wmode="opaque" width="550" height="350" src="http://media.mtvnservices.com/mgid:arc:video:gametrailers.com:0a115b6c-2d82-4a8c-b08b-4b6975e4c0dc" quality="high" bgcolor="000000" name="efp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="autoPlay=false" allowfullscreen="true"></embed> 
-1

說的iframe,她必須回去到地獄:)

<iframe style="z-index:-999;" ... 
+0

這很有趣,但z-index在這種情況下不起作用:( – 2012-07-20 09:27:22

+0

嘗試添加'position:relative'以及。 – Bojangles 2012-07-20 09:42:19

+0

@JamWaffles確實隱藏了firefox 14中頁面背景下的iframe,但在chrome 20.0.1132.57 m中沒有做任何事。 – 2012-07-20 09:48:22