2014-03-12 131 views
-1

你能帮我吗?如何在Youtube播放器上放置“关闭按钮”?我正在尝试,但它会回到玩家身上。如何放置Youtube播放器上的关闭按钮

<iframe id="ytPlayer" class="white_content" style="z-index: 1004;display: block;" frameborder="0" allowfullscreen="1" title="YouTube video player" width="532" height="329" src="http://www.youtube.com/embed/xHLnZMjJ8bY?autoplay=0&amp;enablejsapi=1&amp;origin=http%3A%2F%2F127.0.0.1%3A81"></iframe> 

<div id="ytinfo" class="white_content" style="display: block;"> 
<div id="ytName">A.R Rahman Maahi Ve Song Highway</div> 
<div id="ytDesc"> 
    <p>Maahi Ve Full Song (Audio) ► http://youtu.be/S1aQhVUy_9g </p> 
</div> 
</div> 
<div id="fade" class="black_overlay" onclick="closeLightBox()" style="display: block;"> 
<div style=" 
    z-index: 9999; 
    left: 78%; 
    top: 11%; 
    width: 22px; 
    position: absolute; 
    "> <img src="https://airasiaxtakeover.appspot.com/imgs/1060/WhiteClose.png"></div> 
</div> 

CSS -

.black_overlay{ 
     display: none; 
     position: absolute; 
     top: 0%; 
     left: 0%; 
     width: 100%; 
     height: 100%; 
     background-color: black; 
     z-index:1001; 
     -moz-opacity: 0.8; 
     opacity:.80; 
     filter: alpha(opacity=80); 
    } 
    .white_content { 
     display: none; 
     position: absolute; 
     top: 10%; 
     left: 23%; 
     width: 50%; 
     height: 50%; 
     padding: 16px; 
     background-color: black; 
     z-index:1002; 
     overflow: auto; 
    } 

这里是演示链接: - http://jsfiddle.net/rushijogle/EFbzY/

预先感谢您

+0

怎么样'Z-index' ??? ... –

回答

0

z-index需要更高:

.black_overlay{ 
    z-index:9999; 
} 

DEMO

另外,IE需要将wmode参数添加到您的视频网址,并设置为transparent

EG。

http://www.youtube.com/embed/xHLnZMjJ8bY?autoplay=0&enablejsapi=1&origin=http%3A%2F%2F127.0.0.1%3A81&wmode=transparent

+0

没了..球员会落后收藏 –

+0

我以为这是你想要的。为什么lightbox div内的关闭按钮? – Turnip

+1

这是你正在尝试做什么:http://jsfiddle.net/EFbzY/2/? – Turnip

相关问题