直播网站 - http://uposonghar.com/new-video/
如果您在该页面上悬停YouTube视频,则会看到显示2个共享按钮。这不适用于IE。
当我把iframe src留空但是当我把iftube src上的youtube视频链接放入时,这是完美的工作。检查这个 - uposonghar.com/test/ie.html
HTML -
<div id="video-container" onmouseover="mouseoverBox1()" onmouseout="mouseoutBox1()">
<iframe src="//www.youtube.com/embed/-Jkd9GDSyPc" style="border:1px solid #F00;background:#063;" width="600" height="400" allowfullscreen="" frameborder="0"></iframe>
<ul class="share-video-overlay" id="share-video-overlay">
<li class="facebook" id="facebook"><a class="shareNew" href="https://www.facebook.com/sharer/sharer.php?u=http://uposonghar.com/new-video/" target="_blank" onclick="return windowpop(this.href, 600, 400);" data-reveal-id="myModal">Facebook</a></li>
<li class="twitter" id="twitter"><a class="shareNew" href="http://www.twitter.com/share?&text=Check+this+video&url=http://uposonghar.com/new-video/" target="_blank" onclick="return windowpop(this.href, 600, 400);" data-reveal-id="myModal">Tweet</a></li>
</ul>
</div>
JS
<script type="text/javascript">
function mouseoverBox1(){
var myPara = document.getElementById("share-video-overlay");
myPara.style.display = "block";
}
function mouseoutBox1(){
var myPara = document.getElementById("share-video-overlay");
myPara.style.display = "none";
}
</script>
CSS -
#video-container {
display: block;
position: relative;
width: 600px;
height: 400px;
}
#video-container:after {
clear: both;
}
#share-video-overlay {
display: none;
position: absolute;
left: 0;
top: 150px;
}
.share-video-overlay li {
margin: 5px 0px 5px 0px;
}
答案 0 :(得分:3)
将wmode=transparent
参数附加到iframe
src:example
<iframe
width="600"
height="400"
src="//www.youtube.com/embed/-Jkd9GDSyPc?wmode=transparent"
frameborder="0" allowfullscreen="">
</iframe>