我做了一个弹出窗口并在其中放置了一个YouTube视频.我将视频设置为自动播放.但问题是当我打开页面时视频播放.它是全局自动播放,我希望它在弹出窗口显示时自动播放.我没有找到任何解决方案.
目前,它像我有背景鬼说话的东西.有人可以帮忙吗?
视频Html
<iframe width="800" height="315" src="http://www.youtube.com/embed/?wmode=opaque&autoplay=1&rel=0&color=white" frameborder="0"></iframe><a href="http://www.youtube.com" target="_blank"><img alt="" class="watermark" src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQHcbyVSjHQlwCy3tYqOyLwSWDO4tblhxTVVjKV5R0PtFsPy9TwfA" /></a></div>
</div>
Run Code Online (Sandbox Code Playgroud)
调用弹出窗口
<a href="#" data-reveal-id="video_pop"><img src="kaow.png"/></a>
</div>
Run Code Online (Sandbox Code Playgroud)
弹出内容
<div id="video_pop" class="reveal-modal medium">
<a class="close-reveal-modal"></a>
<div>
<iframe width="800" height="315" src="http://www.youtube.com/embed/?wmode=opaque&autoplay=1&rel=0&color=white" frameborder="0"></iframe><a href="http://www.youtube.com" target="_blank"><img alt="" class="watermark" src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQHcbyVSjHQlwCy3tYqOyLwSWDO4tblhxTVVjKV5R0PtFsPy9TwfA" /></a></div>
</div>
Run Code Online (Sandbox Code Playgroud)
JS
Foundation.libs.reveal = {
name: "reveal",
version: "4.2.2",
locked: !1,
settings: {
animation: "fadeAndPop",
animationSpeed: 250,
closeOnBackgroundClick: !0,
closeOnEsc: !0,
dismissModalClass: "close-reveal-modal",
bgClass: "reveal-modal-bg",
open: function() {},
opened: function() {},
close: function() {},
closed: function() {},
bg: a(".reveal-modal-bg"),
css: …Run Code Online (Sandbox Code Playgroud) 我有一个棘手的问题.对这里的一些人来说可能很有趣.
我试图克服html img并通过css后台属性使用图像.
所以,代码很简单:
<a id="logo" href="/"><img src="/logo1.png"></a>
Run Code Online (Sandbox Code Playgroud)
CSS
position: relative;
height: 85px;
width: 200px;
background: url(/logo2.png) no-repeat;
background-size: 200px 200px;
Run Code Online (Sandbox Code Playgroud)
所以,我想删除html中的logo1和css image logo2超越logo1.
注意:没有额外的div和类,只有那个html标记!
尝试了一切,但我认为这是不可能的?