style(css): 优化关于页面样式布局
- 调整卡片头部布局为弹性盒子模型 - 优化兴趣项在不同设备上的显示效果 - 增强移动端社交链接夜间模式下的视觉效果 - 改进可拖拽按钮的样式与交互逻辑 refactor(js): 重构拖拽功能实现 - 简化拖拽初始化逻辑 - 优化触摸和鼠标事件绑定方式 - 改进位置计算方法以提高性能 - 移除冗余代码提升可读性
This commit is contained in:
114
css/about.css
114
css/about.css
@@ -729,17 +729,17 @@ body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
padding: 20px 25px;
|
||||
border-bottom: 1px solid rgba(128,128,128,0.1);
|
||||
.card-header {
|
||||
padding: 20px 25px;
|
||||
border-bottom: 1px solid rgba(128,128,128,0.1);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.card-header h3 {
|
||||
font-size: 1.1rem;
|
||||
color: var(--text-primary);
|
||||
margin: 0;
|
||||
.card-header h3 {
|
||||
font-size: 1.1rem;
|
||||
color: var(--text-primary);
|
||||
margin: 0;
|
||||
}
|
||||
.card-subtitle {
|
||||
font-size: 0.8rem;
|
||||
@@ -910,7 +910,7 @@ body {
|
||||
gap: 12px;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
|
||||
.interest-item {
|
||||
background: rgba(128, 128, 128, 0.05);
|
||||
padding: 12px 16px;
|
||||
@@ -920,24 +920,24 @@ body {
|
||||
gap: 15px;
|
||||
transition: background 0.3s;
|
||||
}
|
||||
|
||||
|
||||
.interest-item:hover {
|
||||
background: rgba(128, 128, 128, 0.1);
|
||||
}
|
||||
|
||||
|
||||
.i-emoji {
|
||||
font-size: 2rem;
|
||||
color: var(--text-primary);
|
||||
-webkit-text-fill-color: initial;
|
||||
}
|
||||
|
||||
|
||||
.i-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
|
||||
/* 添加 min-width: 0 防止溢出 */
|
||||
.i-text strong {
|
||||
font-size: 1.1rem;
|
||||
@@ -950,7 +950,7 @@ body {
|
||||
-webkit-text-fill-color: transparent;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
.i-text span:not(.i-emoji) {
|
||||
font-size: 0.9rem;
|
||||
color: var(--text-tertiary);
|
||||
@@ -969,13 +969,13 @@ body {
|
||||
grid-template-columns: 1fr;
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
|
||||
.i-text {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
|
||||
.i-text strong, .i-text span {
|
||||
white-space: normal;
|
||||
}
|
||||
@@ -1194,22 +1194,22 @@ body {
|
||||
gap: 12px;
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
|
||||
.interest-item {
|
||||
padding: 12px 16px;
|
||||
border-radius: 12px;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
|
||||
.i-emoji {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
|
||||
.i-text {
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
|
||||
.i-text strong {
|
||||
font-size: 1.1rem;
|
||||
white-space: nowrap;
|
||||
@@ -1218,7 +1218,7 @@ body {
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
|
||||
.i-text span {
|
||||
font-size: 0.9rem;
|
||||
white-space: normal;
|
||||
@@ -1552,34 +1552,34 @@ body {
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.quote-box p.quote-collapsed {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
.quote-box p.quote-collapsed {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* 增强移动端社交链接黑夜模式下的发光效果 */
|
||||
[data-theme="night"] .ms-btn:nth-child(1) {
|
||||
box-shadow: 0 0 20px rgba(132, 250, 176, 0.8);
|
||||
}
|
||||
|
||||
|
||||
[data-theme="night"] .ms-btn:nth-child(2) {
|
||||
box-shadow: 0 0 20px rgba(246, 211, 101, 0.8);
|
||||
}
|
||||
|
||||
|
||||
[data-theme="night"] .ms-btn:nth-child(3) {
|
||||
box-shadow: 0 0 20px rgba(255, 154, 158, 0.8);
|
||||
}
|
||||
|
||||
|
||||
[data-theme="night"] .ms-btn:nth-child(4) {
|
||||
box-shadow: 0 0 20px rgba(168, 237, 234, 0.8);
|
||||
}
|
||||
|
||||
|
||||
[data-theme="night"] .ms-btn:nth-child(5) {
|
||||
box-shadow: 0 0 20px rgba(210, 153, 194, 0.8);
|
||||
}
|
||||
|
||||
|
||||
[data-theme="night"] .ms-btn:nth-child(6) {
|
||||
box-shadow: 0 0 20px rgba(161, 196, 253, 0.8);
|
||||
}
|
||||
@@ -1590,21 +1590,21 @@ body {
|
||||
.mobile-social {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.social-dock {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 12px;
|
||||
justify-items: center;
|
||||
|
||||
.social-dock {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 12px;
|
||||
justify-items: center;
|
||||
}
|
||||
|
||||
.s-icon {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
|
||||
.s-icon {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
}
|
||||
|
||||
.s-icon i {
|
||||
font-size: 1.6rem;
|
||||
|
||||
.s-icon i {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2600,17 +2600,17 @@ body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
padding: 20px 25px;
|
||||
border-bottom: 1px solid rgba(128,128,128,0.1);
|
||||
.card-header {
|
||||
padding: 20px 25px;
|
||||
border-bottom: 1px solid rgba(128,128,128,0.1);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.card-header h3 {
|
||||
font-size: 1.1rem;
|
||||
color: var(--text-primary);
|
||||
margin: 0;
|
||||
.card-header h3 {
|
||||
font-size: 1.1rem;
|
||||
color: var(--text-primary);
|
||||
margin: 0;
|
||||
}
|
||||
.card-subtitle {
|
||||
font-size: 0.8rem;
|
||||
@@ -2781,7 +2781,7 @@ body {
|
||||
gap: 15px;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
|
||||
.interest-item {
|
||||
background: rgba(128, 128, 128, 0.05);
|
||||
padding: 15px;
|
||||
@@ -2791,24 +2791,24 @@ body {
|
||||
gap: 15px;
|
||||
transition: background 0.3s;
|
||||
}
|
||||
|
||||
|
||||
.interest-item:hover {
|
||||
background: rgba(128, 128, 128, 0.1);
|
||||
}
|
||||
|
||||
|
||||
.i-emoji {
|
||||
font-size: 2rem;
|
||||
color: var(--text-primary);
|
||||
-webkit-text-fill-color: initial;
|
||||
}
|
||||
|
||||
|
||||
.i-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* 添加 min-width: 0 防止溢出 */
|
||||
.i-text strong {
|
||||
font-size: 1.1rem;
|
||||
@@ -2821,7 +2821,7 @@ body {
|
||||
-webkit-text-fill-color: transparent;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
.i-text span:not(.i-emoji) {
|
||||
font-size: 0.9rem;
|
||||
color: var(--text-tertiary);
|
||||
|
||||
Reference in New Issue
Block a user