前端样式完成

master
Lee-1203 2022-05-12 14:08:24 +08:00
parent 5b6dc7f0c0
commit 0ef1d5d111
3 changed files with 18 additions and 20 deletions

View File

@ -1293,27 +1293,26 @@
/* 提示框 */ /* 提示框 */
.tips-box{ .tips-box{
display: none; display: none;
min-width: 140px; min-width: 130px;
max-width: 180px; max-width: 300px;
background-color: #fff; background-color: #fff;
border-radius: 3px; border-radius: 3px;
padding: 10px 20px; padding: 10px 15px;
text-align: center;
position: fixed; position: fixed;
top: 20%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%,-50%); transform: translate(-50%,-50%);
z-index: 999; z-index: 999;
} }
.tips-box>span{ .tips-box>span{
display: block; display: block;
font-size: 17px; font-size: 16px;
margin-bottom: 6px;
} }
.tips-box>p{ .tips-box>p{
font-size: 14px; font-size: 14px;
line-height: 1.6; line-height: 1.6;
margin-top: 6px; opacity: .75;
opacity: .8;
} }
@ -1873,11 +1872,6 @@
display: inline-block; display: inline-block;
margin-left: 0; margin-left: 0;
} }
/* 提示框 */
.tips-box{
top: 50%;
}
} }
@media screen and (max-width:414px) { @media screen and (max-width:414px) {

View File

@ -60,24 +60,31 @@ jQuery(function($){
// 登录 // 登录
if($('.login-btn').length > 0){ if($('.login-btn').length > 0){
$('.login-btn').click(function() { $('.login-btn').click(function() {
openTips('登录成功,立即跳转到首页',1000); openTips('登录成功,立即跳转到首页',1000,'','left');
}) })
} }
// 注册 // 注册
if($('.register-btn').length > 0){ if($('.register-btn').length > 0){
$('.register-btn').click(function() { $('.register-btn').click(function() {
openTips('注册成功,立即跳转到登录页',1000); openTips('注册成功,立即跳转到登录页',1000,'警告','center');
}) })
} }
// 提示弹窗 // 提示弹窗
function openTips(val,closeTime='1500'){ function openTips(val,closeTime='1500',title,align){
$('.nav-bg').css('display','block'); $('.nav-bg').css('display','block');
$('.tips-box').css('display','block'); $('.tips-box').css('display','block');
if(title==''){
$('.tips-box').find('span').css('margin-bottom',0);
}
$('.tips-box').css('text-align',align);
$('.tips-box').find('span').text(title);
$('.tips-box').find('p').text(val); $('.tips-box').find('p').text(val);
setTimeout(function() { setTimeout(function() {
$('.nav-bg').css('display','none'); $('.nav-bg').css('display','none');
$('.tips-box').css('display','none'); $('.tips-box').css('display','none');
$('.tips-box').css('text-align','left');
$('.tips-box').find('span').text('');
$('.tips-box').find('p').text(''); $('.tips-box').find('p').text('');
},closeTime) },closeTime)
} }

View File

@ -100,9 +100,6 @@
</div> </div>
<!-- 提示框 --> <!-- 提示框 -->
<div class="tips-box"> <div class="tips-box"><span></span><p></p></div>
<span>提 示</span>
<p></p>
</div>
</body> </body>
</html> </html>