From cd1ee4101a69e6289840b87ff56022b0d85c86d7 Mon Sep 17 00:00:00 2001 From: wolegca <2738076308@qq.com> Date: Fri, 13 Sep 2019 13:04:03 +0800 Subject: [PATCH] add mask effect of message --- base.js | 4 ++++ index.html | 2 ++ myui.css | 10 ++++++++++ 3 files changed, 16 insertions(+) diff --git a/base.js b/base.js index 56e4d1b..1e851d5 100644 --- a/base.js +++ b/base.js @@ -20,9 +20,12 @@ $(function () { }); $(document.body).on('click','.msg-footer span',function(){ var p = $(this).parent().parent(); + var m = $('.mask'); p.css('animation','fadeOut .5s'); + m.css('animation','fadeOut .5s'); setTimeout(function(){ p.remove(); + m.hide(); },500); }); })(); @@ -43,6 +46,7 @@ var message = new function () { '' + '' $(document.body).append(html); + $('.mask').show().css('animation','fadeIn .5s'); $('#mh-'+id).Drag($('#mc-'+id)); return id; } diff --git a/index.html b/index.html index f4cc851..db71aa1 100644 --- a/index.html +++ b/index.html @@ -54,6 +54,8 @@ + +
diff --git a/myui.css b/myui.css index 285d75b..e6dd169 100644 --- a/myui.css +++ b/myui.css @@ -83,6 +83,16 @@ color: rgb(50, 50, 50) } +.mask{ + position: absolute; + display: none; + width:100%; + height:100%; + background-color:rgba(56, 56, 56, 0.747); + z-index:998; + animation-fill-mode: backwards +} + @keyframes fadeIn { from { opacity: 0