实现网页的全屏显示jQuery插件:jQuery FullScreen Plugin
这是一个对 Full Screen API 的封装 jQuery 插件,实现网页的全屏显示。适用各种不同的浏览器,包括FF 10, Chrome 和 Safari。它用于为用户提供了一个更容易阅读的网页版本,可缩放<canvas>和<video>元素。
示例代码:
// The plugin sets the $.support.fullscreen flag: if($.support.fullscreen){ // ... // Show your full screen button here // ... $('#fullScreen').click(function(e){ $('#content').fullScreen(); // You can also pass a hash with properties: // $('#content').fullScreen({ // 'background' : '#111', // 'callback' : function(isFullScreen){ // // ... // // Do some cleaning up here // // ... // } // }); }); }
示例
Go to Tutorialzine for a live demo.
本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
转载本站原创文章,请注明出处,并保留原始链接、图片水印。
本站是一个以用户分享为主的开源技术平台,欢迎各类分享!