60sapi接口搭建完毕,数据库连接测试成功,登录注册部分简单完成

This commit is contained in:
2025-09-02 19:45:50 +08:00
parent b139fb14d9
commit e1f8885c6c
150 changed files with 53045 additions and 8 deletions

View File

@@ -0,0 +1,192 @@
/* 彩虹渐变背景样式 */
/* 主背景渐变 */
body {
background: linear-gradient(
135deg,
rgba(255, 107, 107, 0.3) 0%,
rgba(255, 165, 0, 0.3) 14.28%,
rgba(255, 255, 0, 0.25) 28.56%,
rgba(50, 205, 50, 0.3) 42.84%,
rgba(0, 191, 255, 0.3) 57.12%,
rgba(65, 105, 225, 0.3) 71.4%,
rgba(147, 112, 219, 0.3) 85.68%,
rgba(255, 105, 180, 0.3) 100%
);
background-size: 400% 400%;
animation: rainbowShift 20s ease infinite;
min-height: 100vh;
}
/* 彩虹渐变动画 */
@keyframes rainbowShift {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
/* 半透明覆盖层,增强可读性 */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.4);
backdrop-filter: blur(2px);
z-index: -1;
pointer-events: none;
}
/* 搜索按钮彩虹渐变 */
.search-btn {
background: linear-gradient(
45deg,
rgba(255, 107, 107, 0.8),
rgba(255, 165, 0, 0.8),
rgba(255, 255, 0, 0.7),
rgba(50, 205, 50, 0.8),
rgba(0, 191, 255, 0.8),
rgba(65, 105, 225, 0.8),
rgba(147, 112, 219, 0.8)
);
background-size: 300% 300%;
animation: buttonRainbow 12s ease infinite;
}
@keyframes buttonRainbow {
0%, 100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}
/* 结果卡片边框彩虹渐变 */
.result-card {
position: relative;
overflow: hidden;
}
.result-card::before {
content: '';
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
background: linear-gradient(
45deg,
rgba(255, 107, 107, 0.4),
rgba(255, 165, 0, 0.4),
rgba(255, 255, 0, 0.3),
rgba(50, 205, 50, 0.4),
rgba(0, 191, 255, 0.4),
rgba(65, 105, 225, 0.4),
rgba(147, 112, 219, 0.4),
rgba(255, 107, 107, 0.4)
);
background-size: 400% 400%;
animation: borderRainbow 15s linear infinite;
border-radius: inherit;
z-index: -1;
}
@keyframes borderRainbow {
0% {
background-position: 0% 50%;
}
100% {
background-position: 400% 50%;
}
}
/* 加载动画彩虹效果 */
.loading-spinner {
border: 4px solid rgba(255, 255, 255, 0.3);
border-top: 4px solid transparent;
border-image: linear-gradient(
45deg,
#ff6b6b,
#ffa500,
#ffff00,
#32cd32,
#00bfff,
#4169e1,
#9370db
) 1;
animation: spin 1s linear infinite, colorShift 3s ease infinite;
}
@keyframes colorShift {
0%, 100% {
filter: hue-rotate(0deg);
}
50% {
filter: hue-rotate(180deg);
}
}
/* 链接悬停彩虹效果 */
.result-link:hover {
background: linear-gradient(
90deg,
rgba(255, 107, 107, 0.7),
rgba(255, 165, 0, 0.7),
rgba(255, 255, 0, 0.6),
rgba(50, 205, 50, 0.7),
rgba(0, 191, 255, 0.7),
rgba(65, 105, 225, 0.7),
rgba(147, 112, 219, 0.7)
);
background-size: 200% 200%;
animation: linkRainbow 3s ease infinite;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
@keyframes linkRainbow {
0%, 100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}
/* 标题彩虹文字效果 */
.title {
background: linear-gradient(
90deg,
rgba(255, 107, 107, 0.8),
rgba(255, 165, 0, 0.8),
rgba(255, 255, 0, 0.7),
rgba(50, 205, 50, 0.8),
rgba(0, 191, 255, 0.8),
rgba(65, 105, 225, 0.8),
rgba(147, 112, 219, 0.8)
);
background-size: 200% 200%;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
animation: titleRainbow 8s ease infinite;
}
@keyframes titleRainbow {
0%, 100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}

View File

@@ -0,0 +1,530 @@
/* 基础样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
color: #333;
overflow-x: hidden;
}
/* 容器布局 */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* 头部样式 */
.header {
text-align: center;
margin-bottom: 40px;
padding: 20px 0;
}
.title {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
.subtitle {
font-size: 1.1rem;
color: rgba(255, 255, 255, 0.9);
font-weight: 300;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}
/* 主内容区域 */
.main {
flex: 1;
display: flex;
flex-direction: column;
gap: 30px;
}
/* 搜索区域 */
.search-section {
display: flex;
justify-content: center;
align-items: center;
}
.search-container {
display: flex;
width: 100%;
max-width: 600px;
background: rgba(255, 255, 255, 0.95);
border-radius: 50px;
padding: 8px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
backdrop-filter: blur(10px);
transition: all 0.3s ease;
}
.search-container:focus-within {
transform: translateY(-2px);
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}
.search-input {
flex: 1;
border: none;
outline: none;
padding: 15px 25px;
font-size: 1.1rem;
background: transparent;
color: #333;
border-radius: 50px;
}
.search-input::placeholder {
color: #999;
font-weight: 300;
}
.search-btn {
border: none;
outline: none;
padding: 15px 25px;
border-radius: 50px;
color: white;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
transition: all 0.3s ease;
min-width: 120px;
justify-content: center;
}
.search-btn:hover {
transform: scale(1.05);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.search-btn:active {
transform: scale(0.98);
}
.search-icon {
font-size: 1.2rem;
}
/* 结果区域 */
.result-section {
flex: 1;
display: flex;
justify-content: center;
align-items: flex-start;
min-height: 400px;
}
/* 加载动画 */
.loading {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
padding: 40px;
color: rgba(255, 255, 255, 0.9);
}
.loading-spinner {
width: 50px;
height: 50px;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 结果卡片 */
.result-card {
width: 100%;
max-width: 800px;
background: rgba(255, 255, 255, 0.95);
border-radius: 20px;
padding: 30px;
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
backdrop-filter: blur(10px);
animation: slideUp 0.5s ease;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.result-header {
margin-bottom: 25px;
text-align: center;
}
.result-title {
font-size: 2rem;
font-weight: 700;
color: #333;
margin-bottom: 10px;
}
.result-description {
font-size: 1.1rem;
color: #666;
font-weight: 400;
}
.result-content {
display: grid;
grid-template-columns: 1fr 2fr;
gap: 30px;
align-items: start;
}
.result-image-container {
display: flex;
justify-content: center;
}
.result-image {
width: 100%;
max-width: 250px;
height: auto;
border-radius: 15px;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
transition: transform 0.3s ease;
}
.result-image:hover {
transform: scale(1.05);
}
.result-text {
display: flex;
flex-direction: column;
gap: 20px;
}
.result-abstract h3 {
font-size: 1.3rem;
color: #333;
margin-bottom: 10px;
font-weight: 600;
}
.result-abstract p {
font-size: 1rem;
line-height: 1.8;
color: #555;
text-align: justify;
}
.result-actions {
display: flex;
justify-content: flex-end;
}
.result-link {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 12px 24px;
background: rgba(0, 123, 255, 0.1);
color: #007bff;
text-decoration: none;
border-radius: 25px;
font-weight: 600;
transition: all 0.3s ease;
border: 2px solid transparent;
}
.result-link:hover {
background: rgba(0, 123, 255, 0.2);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}
.link-icon {
font-size: 1.2rem;
transition: transform 0.3s ease;
}
.result-link:hover .link-icon {
transform: translateX(5px);
}
/* 错误消息 */
.error-message {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
padding: 40px;
background: rgba(255, 255, 255, 0.95);
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
backdrop-filter: blur(10px);
text-align: center;
max-width: 500px;
width: 100%;
}
.error-icon {
font-size: 3rem;
}
.error-message h3 {
color: #e74c3c;
font-size: 1.5rem;
margin-bottom: 10px;
}
.error-message p {
color: #666;
font-size: 1rem;
line-height: 1.6;
}
.retry-btn {
padding: 12px 24px;
background: #e74c3c;
color: white;
border: none;
border-radius: 25px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}
.retry-btn:hover {
background: #c0392b;
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}
/* 欢迎消息 */
.welcome-message {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
padding: 60px 40px;
background: rgba(255, 255, 255, 0.9);
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(10px);
text-align: center;
max-width: 600px;
width: 100%;
}
.welcome-icon {
font-size: 4rem;
opacity: 0.8;
}
.welcome-message h3 {
color: #333;
font-size: 1.8rem;
font-weight: 600;
margin-bottom: 10px;
}
.welcome-message p {
color: #666;
font-size: 1.1rem;
line-height: 1.6;
max-width: 400px;
}
/* 页脚 */
.footer {
text-align: center;
padding: 20px 0;
margin-top: 40px;
color: rgba(255, 255, 255, 0.8);
font-size: 0.9rem;
}
/* 平板端适配 (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
.container {
padding: 15px;
}
.title {
font-size: 2.2rem;
}
.result-content {
grid-template-columns: 1fr 1.5fr;
gap: 25px;
}
.result-card {
padding: 25px;
}
}
/* 手机端适配 (最大768px) */
@media (max-width: 768px) {
.container {
padding: 10px;
}
.header {
margin-bottom: 30px;
padding: 15px 0;
}
.title {
font-size: 1.8rem;
}
.subtitle {
font-size: 1rem;
}
.search-container {
max-width: 100%;
padding: 6px;
}
.search-input {
padding: 12px 20px;
font-size: 1rem;
}
.search-btn {
padding: 12px 20px;
min-width: 100px;
font-size: 0.9rem;
}
.search-text {
display: none;
}
.result-card {
padding: 20px;
border-radius: 15px;
}
.result-title {
font-size: 1.5rem;
}
.result-description {
font-size: 1rem;
}
.result-content {
grid-template-columns: 1fr;
gap: 20px;
}
.result-image {
max-width: 200px;
}
.result-abstract h3 {
font-size: 1.2rem;
}
.result-abstract p {
font-size: 0.95rem;
line-height: 1.7;
}
.result-actions {
justify-content: center;
}
.welcome-message {
padding: 40px 20px;
}
.welcome-icon {
font-size: 3rem;
}
.welcome-message h3 {
font-size: 1.5rem;
}
.welcome-message p {
font-size: 1rem;
}
.error-message {
padding: 30px 20px;
}
.error-icon {
font-size: 2.5rem;
}
.error-message h3 {
font-size: 1.3rem;
}
}
/* 小屏手机适配 (最大480px) */
@media (max-width: 480px) {
.title {
font-size: 1.6rem;
}
.search-container {
flex-direction: column;
gap: 10px;
padding: 15px;
border-radius: 20px;
}
.search-input {
border-radius: 15px;
text-align: center;
}
.search-btn {
border-radius: 15px;
justify-content: center;
}
.search-text {
display: inline;
}
.result-card {
padding: 15px;
}
.result-title {
font-size: 1.3rem;
}
.result-image {
max-width: 150px;
}
}