refactor: 重构网站样式和功能,优化用户体验
- 删除冗余CSS文件(bj.css, font.css, sey.css, stars-style.css) - 重构导航栏样式,添加现代化交互效果 - 优化社交图标,使用SVG替代字体图标并添加渐变效果 - 新增关于页面(about.html)及相关资源 - 更新首页(index.html)布局和样式 - 重构星空背景JavaScript(bj.js),添加错误处理 - 新增关于页面JavaScript功能(about.js)
This commit is contained in:
289
css/style.css
289
css/style.css
@@ -88,25 +88,6 @@ pre {
|
||||
pre code { padding: 0; background: none; border: none; word-wrap: normal; }
|
||||
|
||||
/* 主要布局样式 */
|
||||
.container { position: relative; z-index: 500; width: 940px; margin: 0 auto; }
|
||||
|
||||
.content-wrapper {
|
||||
z-index: 800;
|
||||
width: 70%;
|
||||
margin-left: 30%;
|
||||
}
|
||||
|
||||
.content-wrapper__inner { margin: 0 10%; padding: 50px 0; }
|
||||
|
||||
.footer {
|
||||
display: block;
|
||||
padding: 1.5em 0;
|
||||
text-align: center;
|
||||
font-size: 0.85em;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
/* 圆形元素样式 */
|
||||
.avatar, .logo, .profilepic {
|
||||
@@ -201,9 +182,6 @@ pre code { padding: 0; background: none; border: none; word-wrap: normal; }
|
||||
}
|
||||
|
||||
/* 响应式适配 */
|
||||
@media all and (max-width: 1100px) {}
|
||||
|
||||
@media all and (max-width: 960px) {}
|
||||
|
||||
@media all and (max-width: 510px) {
|
||||
.navigation { line-height: 50px; }
|
||||
@@ -261,8 +239,6 @@ pre code { padding: 0; background: none; border: none; word-wrap: normal; }
|
||||
}
|
||||
|
||||
/* 设备适配 */
|
||||
@media screen and (max-width: 768px) { .iphone-simulator { display: none; } }
|
||||
@media screen and (min-width: 769px) { .iphone-simulator { display: block; } }
|
||||
|
||||
/* 重要布局组件样式 */
|
||||
.panel {
|
||||
@@ -271,7 +247,7 @@ pre code { padding: 0; background: none; border: none; word-wrap: normal; }
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.panel__vertical { display: table-cell; vertical-align: middle; }
|
||||
|
||||
|
||||
.panel-title {
|
||||
font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
|
||||
@@ -294,15 +270,14 @@ pre code { padding: 0; background: none; border: none; word-wrap: normal; }
|
||||
/* 一言元素样式 - 细腻优雅字体 */
|
||||
.panel-cover__description {
|
||||
font-family: 'Source Han Serif SC', 'Noto Serif SC', 'PingFang SC', 'Hiragino Sans GB W3', 'Apple LiGothic Medium', 'Microsoft YaHei UI Light', serif;
|
||||
font-size: 0.95em;
|
||||
font-size: 0.9em;
|
||||
font-weight: 200;
|
||||
line-height: 1.9;
|
||||
letter-spacing: 3px;
|
||||
line-height: 2;
|
||||
letter-spacing: 2px;
|
||||
color: #ffffff;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
||||
text-shadow: 0 1px 2px rgba(141, 114, 114, 0.2) !important;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
opacity: 0.92;
|
||||
font-feature-settings: 'kern' 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
@@ -381,64 +356,165 @@ pre code { padding: 0; background: none; border: none; word-wrap: normal; }
|
||||
|
||||
.panel-inverted a { color: #fff; }
|
||||
|
||||
/* 按钮样式 */
|
||||
/* 现代化按钮样式 */
|
||||
.btn, .navigation__item a {
|
||||
padding: 10px 20px;
|
||||
border: 1px solid #4e97d8;
|
||||
border-radius: 20px;
|
||||
font-size: 0.9em;
|
||||
font-weight: bold;
|
||||
letter-spacing: 1px;
|
||||
padding: 8px 16px;
|
||||
border: 2px solid transparent;
|
||||
border-radius: 25px;
|
||||
font-size: 0.95em;
|
||||
font-weight: 450;
|
||||
letter-spacing: 1.2px;
|
||||
text-shadow: none;
|
||||
color: #4e97d8;
|
||||
color: #fff;
|
||||
background: linear-gradient(135deg, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0.005) 100%);
|
||||
backdrop-filter: blur(2px);
|
||||
-webkit-backdrop-filter: blur(2px);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.03);
|
||||
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.btn:hover, .navigation__item a:hover { color: #4e97d8; border-color: #4e97d8; }
|
||||
|
||||
/* 导航样式 */
|
||||
nav { display: inline-block; position: relative; }
|
||||
|
||||
.btn:hover, .navigation__item a:hover {
|
||||
color: #fff;
|
||||
background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.22), rgba(240, 147, 251, 0.18));
|
||||
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
|
||||
border-color: transparent;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* 现代化导航样式 */
|
||||
nav {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin: 0 0;
|
||||
animation: navFadeIn 0.8s ease-out;
|
||||
}
|
||||
|
||||
@keyframes navFadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.navigation {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 15px;
|
||||
margin: 0;
|
||||
padding: 12px;
|
||||
list-style-type: none;
|
||||
background: rgba(255, 255, 255, 0.008);
|
||||
border-radius: 30px;
|
||||
backdrop-filter: blur(1px);
|
||||
-webkit-backdrop-filter: blur(5px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.navigation::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.01) 50%, transparent 70%);
|
||||
animation: shimmer 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes shimmer {
|
||||
0%, 100% {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
|
||||
.navigation__item {
|
||||
display: inline-block;
|
||||
margin: 5px 1px 0 0;
|
||||
line-height: 1em;
|
||||
margin: 0;
|
||||
line-height: 0.5em;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.navigation__item a {
|
||||
display: block;
|
||||
display: inline-block;
|
||||
padding: 10px 16px;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
border-radius: 20px;
|
||||
font-weight: 450;
|
||||
font-size: 0.7em;
|
||||
letter-spacing: 0.5px;
|
||||
position: relative;
|
||||
border-color: rgba(255, 255, 255, 0.6);
|
||||
color: #fff;
|
||||
opacity: 0.9;
|
||||
transition: all 0.3s ease;
|
||||
z-index: 1;
|
||||
background: rgba(255, 255, 255, 0.008);
|
||||
border: 0.5px solid rgba(255, 255, 255, 0.06);
|
||||
backdrop-filter: blur(2px);
|
||||
-webkit-backdrop-filter: blur(3px);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.navigation__item a::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255, 255, 255, 0.008);
|
||||
border-radius: 20px;
|
||||
z-index: -1;
|
||||
backdrop-filter: blur(3px);
|
||||
-webkit-backdrop-filter: blur(3px);
|
||||
margin: 0.5px;
|
||||
}
|
||||
|
||||
/* FAB图标样式 */
|
||||
.fab {
|
||||
font-family: 'Font Awesome 6 Brands';
|
||||
font-weight: 400;
|
||||
font-family: "Font Awesome 6 Brands" !important;
|
||||
font-style: normal !important;
|
||||
font-variant: normal !important;
|
||||
text-rendering: auto !important;
|
||||
-webkit-font-smoothing: antialiased !important;
|
||||
}
|
||||
|
||||
/* 社交图标样式 */
|
||||
.navigation--social .navigation__item a:before {
|
||||
font-family: 'Font Awesome 6 Brands';
|
||||
font-weight: 400;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
|
||||
/* 主导航样式 */
|
||||
.cover-navigation--primary .navigation__item a {
|
||||
margin: 0 5px;
|
||||
padding: 10px 15px;
|
||||
border-width: 1px;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.cover-navigation--primary .navigation__item a:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
|
||||
}
|
||||
|
||||
/* 社交图标导航样式 - 完全重写版本 */
|
||||
@@ -463,10 +539,20 @@ nav { display: inline-block; position: relative; }
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* 响应式社交图标间距和大小 */
|
||||
@media screen and (min-width: 1200px) {
|
||||
/* 导航响应式设计 */
|
||||
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.navigation {
|
||||
padding: 15px;
|
||||
gap: 12px;
|
||||
}
|
||||
.btn, .navigation__item a {
|
||||
padding: 10px 20px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.social-icons-row .social-icon {
|
||||
margin: 0 3%;
|
||||
margin: 0 2%;
|
||||
}
|
||||
.social-icons-row .social-icon a {
|
||||
font-size: 1.2em;
|
||||
@@ -474,6 +560,16 @@ nav { display: inline-block; position: relative; }
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.navigation {
|
||||
padding: 12px;
|
||||
gap: 10px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.btn, .navigation__item a {
|
||||
padding: 8px 16px;
|
||||
font-size: 0.85em;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.social-icons-row .social-icon {
|
||||
margin: 0 1.5%;
|
||||
}
|
||||
@@ -483,6 +579,17 @@ nav { display: inline-block; position: relative; }
|
||||
}
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
.navigation {
|
||||
padding: 10px;
|
||||
gap: 8px;
|
||||
flex-direction: column;
|
||||
}
|
||||
.btn, .navigation__item a {
|
||||
padding: 8px 14px;
|
||||
font-size: 0.8em;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.social-icons-row .social-icon {
|
||||
margin: 0 1%;
|
||||
}
|
||||
@@ -497,14 +604,39 @@ nav { display: inline-block; position: relative; }
|
||||
font-size: 1.2em;
|
||||
display: inline-block;
|
||||
background-color: transparent !important;
|
||||
color: #fff !important;
|
||||
width: auto;
|
||||
opacity: 0.9;
|
||||
transition: opacity 0.3s ease;
|
||||
opacity: 0.85;
|
||||
transition: all 0.3s ease;
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.social-icons-row .social-icon a:hover {
|
||||
opacity: 1;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.social-icons-row .social-icon a svg path {
|
||||
transition: fill 0.3s ease;
|
||||
}
|
||||
|
||||
.social-icons-row .social-icon a[href*="github"]:hover svg path {
|
||||
fill: url(#github-gradient-hover) !important;
|
||||
}
|
||||
|
||||
.social-icons-row .social-icon a[href*="linkedin"]:hover svg path {
|
||||
fill: url(#linkedin-gradient-hover) !important;
|
||||
}
|
||||
|
||||
.social-icons-row .social-icon a[href*="twitter"]:hover svg path {
|
||||
fill: url(#twitter-gradient-hover) !important;
|
||||
}
|
||||
|
||||
.social-icons-row .social-icon a.weixin-link:hover svg path {
|
||||
fill: url(#wechat-gradient-hover) !important;
|
||||
}
|
||||
|
||||
.social-icons-row .social-icon a[href*="mailto"]:hover svg path {
|
||||
fill: url(#email-gradient-hover) !important;
|
||||
}
|
||||
|
||||
/* 覆盖社交图标i元素的样式,移除小横杠黑点 */
|
||||
@@ -535,7 +667,8 @@ nav { display: inline-block; position: relative; }
|
||||
left: auto !important;
|
||||
}
|
||||
|
||||
.social-icons-row .social-icon i {
|
||||
.social-icons-row .social-icon i,
|
||||
.social-icons-row .social-icon svg {
|
||||
position: static;
|
||||
display: inline-block;
|
||||
transform: none !important;
|
||||
@@ -543,6 +676,8 @@ nav { display: inline-block; position: relative; }
|
||||
height: auto;
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
fill: currentColor;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.social-icons-row .social-icon .label {
|
||||
@@ -555,11 +690,14 @@ nav { display: inline-block; position: relative; }
|
||||
|
||||
.social-icons-row .social-icon a:hover {
|
||||
opacity: 1;
|
||||
transform: none !important; /* 确保悬停时不移动 */
|
||||
background-color: transparent !important;
|
||||
color: #fff !important;
|
||||
transform: scale(1.1) !important;
|
||||
background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 50%, #45b7d1 100%) !important;
|
||||
-webkit-background-clip: text !important;
|
||||
-webkit-text-fill-color: transparent !important;
|
||||
background-clip: text !important;
|
||||
letter-spacing: normal !important;
|
||||
box-shadow: none !important;
|
||||
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
|
||||
/* 隐藏社交导航文本名称 */
|
||||
@@ -694,7 +832,8 @@ nav { display: inline-block; position: relative; }
|
||||
}
|
||||
|
||||
.power a {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 0.5em;
|
||||
text-decoration: none;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
@@ -711,11 +850,7 @@ nav { display: inline-block; position: relative; }
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
/* 微信图标样式 */
|
||||
.wechat-icon {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
/* navigation-wrapper 间距调整 */
|
||||
.navigation-wrapper {
|
||||
|
||||
Reference in New Issue
Block a user