fix: 优化关于链接样式,使用flex布局实现图标与文字垂直居中

This commit is contained in:
MKStoler1024 2025-04-23 22:46:33 +00:00
parent 70562f8563
commit a8f8080327
2 changed files with 7 additions and 2 deletions

View File

@ -50,12 +50,14 @@
.feature-list li {
margin-bottom: 12px;
display: flex;
align-items: flex-start;
align-items: center; /* 修改为center保证图标和文字垂直居中 */
}
.feature-list .material-icons {
margin-right: 12px;
color: #D0BCFF;
flex-shrink: 0; /* 防止图标被压缩 */
align-self: center; /* 保证图标始终居中 */
}
.back-btn {
@ -185,7 +187,7 @@
<h2>许可证</h2>
<ul class="feature-list">
<li>
<span class="material-icons">gavel</span>
<span class="material-icons" style="font-size:24px;">gavel</span>
<div>
<p>本项目采用 GNU General Public License v3.0</p>
<pre id="license-content" style="font-size: 0.9em; color: #CAC4D0; white-space: pre-wrap; max-height: 400px; overflow-y: auto; padding: 16px; background: #1C1B1F; border-radius: 8px;">正在加载许可证内容...</pre>

View File

@ -140,6 +140,9 @@
font-size: 14px;
text-decoration: none;
color: rgba(255, 255, 255, 1);
display: flex; /* 新增使用flex布局 */
align-items: center; /* 新增:垂直居中对齐 */
gap: 6px; /* 新增:图标与文字间距 */
}
.about-link:hover {