Files
hsa/Html/apps/static/css/login.css
2025-08-27 19:39:38 +08:00

189 lines
3.4 KiB
CSS

/* Reset some default styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Body & Page background */
body {
font-family: 'Arial', sans-serif;
background: linear-gradient(135deg, #70ff88, #e6d05f); /* 美丽的渐变背景 */
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
.login-container {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 40%;
}
.login-card {
background-color: white;
padding: 40px;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 500px;
text-align: center;
}
.login-title {
font-size: 28px;
font-weight: bold;
color: #333;
margin-bottom: 20px;
}
.login-switch {
display: flex;
justify-content: space-around;
margin-bottom: 20px;
}
.switch-btn {
background-color: #2575fc;
color: white;
padding: 10px 20px;
font-size: 16px;
border: none;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.3s;
}
.switch-btn:hover {
background-color: #6a11cb;
}
.login-form {
display: flex;
flex-direction: column;
gap: 20px;
}
.input-group {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.input-group label {
font-size: 14px;
color: #555;
margin-bottom: 5px;
}
.input-group input {
width: 100%;
padding: 12px;
border-radius: 8px;
border: 1px solid #ddd;
font-size: 16px;
transition: border-color 0.3s;
}
.input-group input:focus {
border-color: #2575fc;
outline: none;
}
/* 基本按钮样式 */
.role-btn {
background-color: #2575fc; /* 默认的蓝色背景(学生登录) */
color: white;
border: none;
border-radius: 8px;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s, transform 0.3s; /* 背景色平滑过渡,按钮缩放 */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* 按钮悬停效果 */
.role-btn:hover {
background-color: #6a11cb; /* 悬停时变为深蓝色 */
transform: scale(1.05); /* 按钮放大效果 */
}
/* 切换到教师登录时的背景色 */
.teacher-login .role-btn {
background-color: #005848; /* 深蓝色背景(教师登录) */
}
/* 切换到教师登录时的悬停效果 */
.teacher-login .role-btn:hover {
background-color: #017c6e;
}
.login-btn {
background-color: #2575fc;
color: white;
padding: 14px;
font-size: 16px;
border: none;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.3s;
width: 100%;
margin-top: 30px;
margin-bottom: 30px;
}
.login-btn:hover {
background-color: #6a11cb;
}
.forgot-password {
margin-top: 10px;
}
.forgot-password a {
color: #2575fc;
font-size: 14px;
text-decoration: none;
}
.forgot-password a:hover {
text-decoration: underline;
}
.social-login {
margin-top: 20px;
}
.social-btn {
width: 100%;
padding: 12px;
margin: 5px 0;
font-size: 16px;
border: none;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.3s;
}
.social-btn.google {
background-color: #db4437;
color: white;
}
.social-btn.google:hover {
background-color: #c1351d;
}
.social-btn.facebook {
background-color: #3b5998;
color: white;
}
.social-btn.facebook:hover {
background-color: #2d4373;
}