;
;
;
;
;
;
;
// 檢視本機支援
if (typeof document.cancelFullScreen != 'undefined') {
for (var i = 0, il = browserPrefixes.length; i fullScreenApi.prefix = browserPrefixes[i];
;
;
;
;
;
;
;
if (typeof document[fullScreenApi.prefix 'CancelFullScreen'] != 'undefined') {
fullScreenApi.supportsFullScreen = true;
}
}
}
// 更新方法來執行一些有用的操作
if (fullScreenApi.supportsFullScreen) {
fullScreenApi.fullScreenEventName = fullScreenApi.prefix 'fulcreen];
fullScreenApi.isFullScreen = function () {
switch (this.prefix) {
case '': 預設值:
return document[this.prefix 'FullScreen'];
}
fullScreenApi.cancelFullScreen = function (> fullScreenApi.cancelFullScreen = function (> fullScreenApi.cancelFullScreen = function (H> fullScreenApi.cancelFullScreen = function ( == '') ? document.cancelFullScreen() : document[this.prefix 'CancelFullScreen']();
}
// jQuery 外掛程式
if (typeof jQuery != 'undefined') {
jQuery.fn.requestFullScreen = function () {
return this.each(function () {
if (fullScreenApi.supportsFullScreen) {
};
}
window.fullScreenApi = fullScreenApi;
})();
$(function(){
$("#fullScreenBtn").click(function(){
$("#fullScreen").requestFullScreen();
});
if(window.top != self){
$("#tip").text("iframe裡面不能示範功能!請點選右下角的全螢幕查看!").show();
});
if (!fullScreenApi.supportsFullScreen) {
alert("您的破瀏覽器不支援全螢幕API哦,請換高版本的chrome或firebox!");
padding-top:10%;
text-align:center;
背景:無重複捲動 0 0 #FFFFFF;
}
.fullScreen:全螢幕 {
寬度:100%;
高度:100%;
}
高度:100%;
/* W3C 提案(無破折號)*/
.fullScreen:fullscreen {
寬度:100%;
高度:100%;
/* 目前有效的供應商前綴*/
.fullScreen:-webkit-full-screen, .fullScreen:-moz-full-screen {
%;
}
:-webkit-全螢幕{
寬度:100%;
高度:100%;
}