新增注册(页面跳转)及登录(弹窗)功能

This commit is contained in:
ChloeChen0423
2025-05-13 17:14:19 +09:00
parent 7c63f2f07b
commit 68cb20c2d5
5 changed files with 409 additions and 22 deletions

View File

@ -322,6 +322,107 @@ main.flex-fill {
transform: translateY(-2px);
}
.modal {
position: fixed;
z-index: 999;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.4);
display: flex;
justify-content: center;
align-items: center;
}
.modal-content {
background-color: #fff;
padding: 2rem;
width: 90%;
max-width: 400px;
border-radius: 12px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
position: relative;
animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-20px); }
to { opacity: 1; transform: translateY(0); }
}
.modal-content h2 {
margin-top: 0;
font-size: 1.5rem;
text-align: center;
color: #333;
}
.modal-content label {
display: block;
margin: 1rem 0 0.3rem;
font-weight: 600;
color: #444;
}
.modal-content input {
width: 100%;
padding: 0.6rem;
border: 1px solid #ccc;
border-radius: 6px;
box-sizing: border-box;
font-size: 1rem;
}
.modal-actions {
margin-top: 1.5rem;
display: flex;
justify-content: space-between;
}
.modal-actions button {
flex: 1;
margin: 0 0.3rem;
padding: 0.6rem;
border: none;
border-radius: 6px;
background-color: #5aa9fe;
color: white;
font-weight: bold;
cursor: pointer;
transition: background-color 0.2s ease;
}
.modal-actions button:hover {
background-color: #0056b3;
}
.modal-actions button#cancelLogin,
.modal-actions button#cancelRegister {
background-color: #ccc;
color: #333;
}
.modal-actions button#cancelLogin:hover,
.modal-actions button#cancelRegister:hover {
background-color: #999;
}
.close {
position: absolute;
top: 12px;
right: 16px;
font-size: 24px;
font-weight: bold;
color: #666;
cursor: pointer;
}
.close:hover {
color: #000;
}
@media (max-width: 768px) {
.slider-wrapper {
flex-direction: column;