前端样式完成

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

View File

@ -60,24 +60,31 @@ jQuery(function($){
// 登录
if($('.login-btn').length > 0){
$('.login-btn').click(function() {
openTips('登录成功,立即跳转到首页',1000);
openTips('登录成功,立即跳转到首页',1000,'','left');
})
}
// 注册
if($('.register-btn').length > 0){
$('.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');
$('.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);
setTimeout(function() {
$('.nav-bg').css('display','none');
$('.tips-box').css('display','none');
$('.tips-box').css('text-align','left');
$('.tips-box').find('span').text('');
$('.tips-box').find('p').text('');
},closeTime)
}

View File

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