现在很多网站都流行用视频作为背景?比如支付宝等等。他们是怎么做的呢?难不难?用这个插件你也能做到而且很简单。
BigVideo.js视频做背景的jQuery插件:
github地址:https://github.com/dfcb/BigVideo.js
demo地址:http://dfcb.github.io/BigVideo.js/
自己做的demo效果图
BigVideo demo
使用方法:
1.引用JS
JQUERY(版本>1.7.2)
Video.js (版本>3.2)(下载地址:http://videojs.com/)
2.js代码
$(function() {
var BV = new $.BigVideo();
BV.init();
BV.show(‘http://img.ksbbs.com/asset/Mon_1605/25d705200a4eab4.mp4’);
});
现在你可以在浏览器中预览效果了