Facebook和css,如何在视频的顶部放置一个类似的评论对话框? [英] facebook and css, how to place a like comment dialog on top of a video?

查看:105
本文介绍了Facebook和css,如何在视频的顶部放置一个类似的评论对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个YouTube视频和类似的按钮。当我点击相似按钮并且打开留言对话框时,会出现问题。它在视频下方。

 < div> 
< div class =like_like>
< div id =fb-root>< / div>< script src =http://connect.facebook.net/en_US/all.js#appId=211607088882&amp;xfbml = 1\" >< /脚本>
< fb:like href =http://www.xxx.com/tpain.phplayout =button_countshow_faces =falsewidth =240height =40action =like colorscheme =light>< / fb:like>
< / div>
< / div>
< div class =insidde_video>
< iframe width =300height =200src =http://www.youtube.com/embed/CNmCOTBsAwQframeborder =0allowfullscreen>< / iframe>
< / div>



任何想法?



谢谢



解决方案是在youtube iframe src上添加?wmode = opaque 。例如:< iframe width =300height =200src =http://www.youtube.com/embed/-oQFSfuRy24?wmode=opaqueframeborder =0allowfullscreen>


$ b

解决方案

您可以尝试为视频嵌入的< param> 元素定义一些属性:

 < param name =wmodevalue =transparent> 

应该使视频服从页面上元素的z-index堆叠。但是,您已被警告,使用此方法可能会导致严重的放缓。



还有一个 javascript解决方案,虽然看起来更麻烦,不需要你代码的硬编码。


i have a youtube video and a like button on top of it. The problem occurs when i click the like button and the 'leave comment' dialog opens. it goes underneath the video.

<div>    
<div class="like_like">
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=211607088882&amp;xfbml=1"></script>
<fb:like href="http://www.xxx.com/tpain.php" layout="button_count" show_faces="false" width="240" height="40" action="like" colorscheme="light"></fb:like>
</div>
</div>
<div class="insidde_video">
<iframe width="300" height="200" src="http://www.youtube.com/embed/CNmCOTBsAwQ" frameborder="0" allowfullscreen></iframe>
</div>

any ideas?

thanks

the solution is to add ?wmode=opaque on the youtube iframe src. ex: <iframe width="300" height="200" src="http://www.youtube.com/embed/-oQFSfuRy24?wmode=opaque" frameborder="0" allowfullscreen></iframe>

thanks all

解决方案

You can try defining some properties for the <param> element of the video embed:

<param name="wmode" value="transparent">

That should make the video obey the z-index stacking of elements on the page. However, you have been warned that using this method may cause massive slowdowns.

There is also a javascript solution to this, although looking more cumbersome, doesn't require hardcoding on your behalf.

这篇关于Facebook和css,如何在视频的顶部放置一个类似的评论对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆