实现网页的全屏显示jQuery插件:jQuery FullScreen Plugin

jopen 9年前

这是一个对 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.

项目主页:http://www.open-open.com/lib/view/home/1416465083773