From 5b6dc7f0c014f33db4c03d8e76e54048527e492a Mon Sep 17 00:00:00 2001 From: Lee-1203 <342694918@qq.com> Date: Thu, 12 May 2022 13:44:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=A0=B7=E5=BC=8F=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/style.css | 13 +++++++------ js/my-site.js | 28 +++++++++++++++++++--------- login.html | 2 +- register.html | 8 +++++++- 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/css/style.css b/css/style.css index 6f8ba0a..de052fb 100644 --- a/css/style.css +++ b/css/style.css @@ -605,7 +605,8 @@ margin-bottom: 32px; } -.login-btn{ +.login-btn, +.register-btn{ width: calc(88% - 136px); height: 48px; margin: 25px 0 40px 136px; @@ -1292,11 +1293,11 @@ /* 提示框 */ .tips-box{ display: none; - min-width: 160px; - max-width: 240px; + min-width: 140px; + max-width: 180px; background-color: #fff; border-radius: 3px; - padding: 10px 10px; + padding: 10px 20px; text-align: center; position: fixed; top: 20%; @@ -1310,8 +1311,8 @@ } .tips-box>p{ font-size: 14px; - line-height: 1.8; - margin-top: 4px; + line-height: 1.6; + margin-top: 6px; opacity: .8; } diff --git a/js/my-site.js b/js/my-site.js index 95ec68a..2435cab 100644 --- a/js/my-site.js +++ b/js/my-site.js @@ -57,20 +57,30 @@ jQuery(function($){ autoplay:false, }) - // 弹框事件 + // 登录 if($('.login-btn').length > 0){ $('.login-btn').click(function() { - $('.nav-bg').css('display','block'); - $('.tips-box').css('display','block'); - setTimeout(function() { - $('.nav-bg').css('display','none'); - $('.tips-box').css('display','none'); - call(); - },1000) + openTips('登录成功,立即跳转到首页',1000); + }) + } + // 注册 + if($('.register-btn').length > 0){ + $('.register-btn').click(function() { + openTips('注册成功,立即跳转到登录页',1000); }) } - // 记住密码 + // 提示弹窗 + function openTips(val,closeTime='1500'){ + $('.nav-bg').css('display','block'); + $('.tips-box').css('display','block'); + $('.tips-box').find('p').text(val); + setTimeout(function() { + $('.nav-bg').css('display','none'); + $('.tips-box').css('display','none'); + $('.tips-box').find('p').text(''); + },closeTime) + } diff --git a/login.html b/login.html index 735361e..ac6551a 100644 --- a/login.html +++ b/login.html @@ -102,7 +102,7 @@
密码位数不正确
+