先看看弹窗效果 , 如下:
// 放大图片 $ (página) .on ('clique', '. PopupImage img', function () {var that = $ (this); that.popupImage ({this: that, width: "200px"})}); // 相册弹窗 $ .fn.popupImage = function (obj) {var $ this = obj.This; var sj_w = $ this [0] .naturalHeight; var src = $ this.attr ('src'); var H = $ ('corpo'). Hight (); var w = $ ('corpo'). largura (); var preto = 10; var shadew = W - preenchimento*2; var iMg = '', Shade = ''; img = '<div style = "Posição: absoluto; topo: 0; esquerda: 0; z-index: 999999; preenchimento: 10px'+preenchimento+'px; largura:'+w+'px; altura:'+h+'px; line-hEATT:'+h+'px; text-align: central;" "" "" " > '+' <img src = "'+src+'" style = "max-width: '+shadew+' px"/> </div> '; Shade = '<div Style = "Posição: Absoluto; topo: 0; esquerda: 0; largura:'+w+'px; altura:'+h+'px; fundo: #000; z-index: 999990; opacidade: .8;"> </div>'; $ ('corpo'). Anexar (sombra); $ ('corpo'). Appender (IMG); $ ('. pop-up-imagem'). on ('clique', function () {$ ('.以上就是本文的全部内容 , 希望对大家的学习有所帮助 , 也希望大家多多支持武林网。