From 3b3794dfb4d04497ddd8745dadf77ff14a2f3f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Fri, 19 Aug 2022 02:44:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=BC=BA=20layer=20photos=20=E5=B1=82?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/css/modules/layer.css | 8 +++---- src/modules/layer.js | 49 ++++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 31 deletions(-) diff --git a/src/css/modules/layer.css b/src/css/modules/layer.css index 27675b3d..41c1b9e0 100644 --- a/src/css/modules/layer.css +++ b/src/css/modules/layer.css @@ -157,10 +157,10 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;} .layui-layer-imgnext:hover{color: #959595;} .layui-layer-imgbar{position: fixed; left:0; right: 0; bottom:0; width:100%; height: 40px; line-height: 40px; background-color:#000\9; filter:Alpha(opacity=60); background-color: rgba(2,0,0,.35); color: #fff; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size:0;} .layui-layer-imgtit{/*position:absolute; left:20px;*/} -.layui-layer-imgtit *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:12px;} -.layui-layer-imgtit a{max-width:65%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; color:#fff;} -.layui-layer-imgtit a:hover{color:#fff; text-decoration:underline;} -.layui-layer-imgtit em{padding-left:10px; font-style: normal;} +.layui-layer-imgtit *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; padding: 0 5px; font-size:12px; color: #fff;} +.layui-layer-imgtit h3{max-width:65%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-weight: 300;} +.layui-layer-imgtit a:hover{color: #fff; text-decoration: underline;} +.layui-layer-imgtit em{font-style: normal;} /* 关闭动画 */ @-webkit-keyframes layer-bounceOut { diff --git a/src/modules/layer.js b/src/modules/layer.js index ea1b5a33..f5a96ffd 100644 --- a/src/modules/layer.js +++ b/src/modules/layer.js @@ -1412,7 +1412,7 @@ layer.photos = function(options, loop, key){ loadImage(data[start].src, function(img){ layer.close(dict.loadi); - var alt = data[start].alt||''; + var alt = data[start].alt || ''; //切换图片时不出现动画 if(key) options.anim = -1; @@ -1451,36 +1451,31 @@ layer.photos = function(options, loop, key){ isOutAnim: false, skin: 'layui-layer-photos' + skin('photos'), content: '