From d044db6ac1dadec0084a13d570703de6069c6d9a Mon Sep 17 00:00:00 2001 From: Eltrac <45323514+BigCoke233@users.noreply.github.com> Date: Wed, 22 Jan 2020 18:24:48 +0800 Subject: =?UTF-8?q?=F0=9F=91=93=20Perf:=20=E9=80=82=E5=BA=94=E6=9F=90?= =?UTF-8?q?=E4=BA=9B=E5=85=83=E7=B4=A0=E7=9A=84=E6=96=B0=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/main/component.css | 79 ++++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 27 deletions(-) (limited to 'assets/css/main/component.css') diff --git a/assets/css/main/component.css b/assets/css/main/component.css index dc14155..c116d60 100644 --- a/assets/css/main/component.css +++ b/assets/css/main/component.css @@ -33,34 +33,59 @@ button { } /* Alert */ .alert { - background: rgb(100,100,100); - color: #fff; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - padding: 10px 18px; - position: fixed; top: 0; - left: 0; - right: 0; - width: 100%; - margin: 0 auto; - box-shadow: 0 0 4px #000; - -moz-box-shadow: 0 0 4px #000; - -webkit-box-shadow: 0 0 4px #000; - z-index: 20; - transition: all 0.3s; -} -.alert.ready { - top: -200px; -} -.alert-close { - border: none; - background: rgb(0,0,0,0); - transform: scale(0.8); - color: #fff; - float: right; - margin-top: -36px; -} + left: 0; + right: 0; + z-index: 10; + padding: 1em; + position: fixed; + color: #000; + background: rgba(255,255,255,0.86); + backdrop-filter: blur(18px); + -webkit-backdrop-filter: blur(10px); + border-radius: 6px; + margin: 0 auto 1em auto; + box-shadow: 0 5px 5px -2px rgba(0, 0, 0, 0.2); + transition: .3s; +} +.alert.adding { + -webkit-animation: slideDown 0.2s ease forwards; + animation: slideDown 0.3s ease forwards; +} +.alert.remove { + -webkit-animation: slideUp 0.2s ease forwards; + animation: slideUp 0.3s ease forwards; +} +@-webkit-keyframes slideDown { + 0%{ + top: -150px; + } + 25%{ + top: -50px; + } + 50%{ + top: 0; + } + 100%{ + top: 100px;; + } +} +@-webkit-keyframes slideUp { + 0%{ + top: 100px; + } + 25%{ + top: 0; + } + 50%{ + top: -50px; + } + 100%{ + top: -200px; + } +} + + /* Mask */ .mask { position: fixed; -- cgit v1.2.3