Possible to fade out an embedded Youtube video?
Is it possible to fade out开发者_如何学编程 a Javascript embedded Youtube video using Javascript/jQuery? At the moment I have embedded a video and when I try to fade it out using jQuery's fadeOut()
function, it just disappears instead of fading. Is it possible to have a fade out effect on it using Javascript/jQuery or any other Javascript libraries (without any extra HTML elements)?
You should use wmode = "transparent"
. See Create a transparent background in a Flash movie
Working Demo
<div id="wrapper">
<object>
<param name="movie" value="..."></param>
<param name="wmode" value="transparent"></param>
<embed class="video" src="..." type="application/x-shockwave-flash"
wmode="transparent"></embed>
</object>
</div>
Usage
$("#wrapper").fadeOut(2000);
精彩评论