Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 当我给lightbox close绝对位置时,如何在lightbox处于活动状态时使页面停止滚动_Php_Html_Css_Photoshop - Fatal编程技术网

Php 当我给lightbox close绝对位置时,如何在lightbox处于活动状态时使页面停止滚动

Php 当我给lightbox close绝对位置时,如何在lightbox处于活动状态时使页面停止滚动,php,html,css,photoshop,Php,Html,Css,Photoshop,我正在使用下面的html代码,但当单击图像时,无法阻止灯箱覆盖滚动 <div class="grid_area_image"> <a class="example-image-link" href="Images/Vegetation distribution.png" data-lightbox="example-set" data-title="Click the right half of the image to move forward."> <im

我正在使用下面的
html
代码,但当单击
图像时,无法阻止
灯箱覆盖
滚动

<div class="grid_area_image">    <a class="example-image-link" href="Images/Vegetation distribution.png" data-lightbox="example-set" data-title="Click the right half of the image to move forward."> <img src="Images/Vegetation distribution.png" alt="Vegetation distribution" class="img-responsive example-image"></a>    </div>

所以请告诉我怎么做。。这是lightbox-min.js

/*! * Lightbox v2.8.2 * by Lokesh Dhakar * * More info: * http://lokeshdhakar.com/projects/lightbox2/ * * Copyright 2007, 2015 Lokesh Dhakar * Released under the MIT license * https://github.com/lokesh/lightbox2/blob/master/LICENSE */ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:500,fitImagesInViewport:!0,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a('').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;ij||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerTopPadding+this.containerBottomPadding;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=this.options.alwaysShowNavOnTouchDevices?!0:!1}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex1&&this.options.showImageNumberLabel){var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(c).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):("n"===f||e===d)&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},new b}); //# sourceMappingURL=lightbox.min.map /*! *Lightbox v2.8.2 *洛克什·达卡尔 * *更多信息: * http://lokeshdhakar.com/projects/lightbox2/ * *版权所有2007年、2015年Lokesh Dhakar *根据麻省理工学院许可证发布 * https://github.com/lokesh/lightbox2/blob/master/LICENSE */ !函数(a,b){“函数”==typeof define&&define.amd?define([“jquery”],b):“对象”==typeof exports?module.exports=b(require(“jquery”):a.lightbox=b(a.jquery)}(this,函数(a){函数b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}返回b.defaults={albumLabel:“图像%1(共%2幅)”,始终显示滚动:!1},b.prototype.option=函数(b){a.extend(this.options,b)},b.prototype.imageCountLabel=函数(a,b){返回该函数。选项。albumLabel。替换(/%1/g,a)。替换(/%2/g,b)},b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a(“body”)。单击(“单击”,“a[rel^=lightbox],区域[rel^=lightbox],a[data lightbox],区域[data lightbox]”,函数(c){return b.start(a(c.currentTarget)),!1},b.prototype.build=function(){var b=this;a(“”)。附于(a(“body”),$lightbox=a(“),this.$overlay=a(“#lightboxOverlay”)、this.$outerContainer=this.$lightbox.find(“.lb outerContainer”)、this.$container=this.$lightbox.find(.lb container”)、this.containerOppAdding=parseInt(this.$container.css(“padding right”),10)、this.containerBottopAdding=parseInt(this.$container.css(“padding bottom”),10),this.containerLeftPadding=parseInt(this.$container.css(“padding left”),10),this.$overlay.hide().on(“click”,function(){return b.end(),!1}),this.$lightbox.hide().on(“click”,function(c){return lightbox”==a(c.target).attr(“id”)&&b.end(),!1}),this.$outerContainer.on(“click”,function,(c){return lightbox)==a(c.target).attr(“id”)和&b.end(),!1}),this.$lightbox.find(.lb prev”).on(“单击”,函数(){return 0==b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(.lb next”)。on(“单击”,函数(){return b.currentImageIndex==b.album.length-1?b.changeImage(b.currentImageIndex+1),1}),this.$lightbox.find(“.lb loader,.lb close”).on(“click”,function(){return b.end(),!1}),b.prototype.start=function(b){function c(a){d.album.push({link:a.attr(“href”),title:a.attr(“data title”)| a.attr(“title”)})var d=this,e=a(窗口);e.on(“resize”,a.proxy(this.sizeOverlay,this)),a(“select,object,embedded.css”(“隐藏的可见性”){}这一次的sizeOverlay(),这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的专辑的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这一次的这次的专辑的)},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document.width()).height(a(document.height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(.lb dataContainer”).width,d.$lightbox.find(.lb-prevLink)).h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerOppAdding+this.containerBottomPadding;e!==g | | f!=h?this.$outerContainer.animate({宽度:g,高度:h},this.options.resizeDuration,“swing”,函数()){}):c},b.prototype.showImage=function(){this.$lightbox.find(“.lb loader”).stop(!0.hide(),this.$lightbox.find(.lb image”).fadeIn(“slow”),this.updateNav(),this.updateNav(),this.preadneighborringimages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;尝试{document.createEvent(“TouchEvent”),a=this.options.alwaysShowNavOnTouchDevices.lb prev“).css(“不透明”、“1”)、this.currentImageIndex1和this.options.showImageNumberLabel{var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(“.lb number”).text(c).fadeIn(“快速”)}否则this.$lightbox.find(.lb number”).hide();this.$outerContainer.removeClass(“动画”),this.$lightbox.find(.lb数据容器).fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()},b.prototype.preload neighborringimages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}},b.prototype.enableKeyboardNav=function(){a(document).on(“keyup.keyboard”,a.proxy(this.keyboardAction,this)),b.prototype.disableKeyboardNav=function(){a(document).off(.keyboard”)},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e==b | f.match(/x()):“this.end.”==f | e==c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapparound&&this.album.length>1&&this.changeImage(this.album.length-1):((“n”==f | e==d)&(this.currentImageIndex!==this.album.length-1)this.changeImage(this.currentImageIndex+1):this.options.wrapparound&&this.albu
lightbox.option({
   disableScrolling:true
})