0

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)?

4

1 回答 1

2

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);
于 2010-11-14T15:19:46.317 回答