0

I want a short movie clip to play when visitors arrive at my site. I want the video area to show up without movie controls, and without any kind of border frame, so that it just looks like a moving picture. What's the best way to do that?

I'm not overly concerned with browser support. I don't want to use Flash.

Thanks.

4

1 回答 1

1

You can easily do this with the HTML5 video element and a little bit of javascript. You can embed the video into the page using:

<video id="video">
<source src="movie.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

Just replace the src and type with your information. As for the Javascript, you can use the following:

var video = document.getElementById("video");
video.removeAttribute("controls");

This is, of course, assuming your video element's ID is "video".

于 2012-04-03T23:12:09.520 回答