diff --git a/frontend_nuxt/assets/global.css b/frontend_nuxt/assets/global.css index fb12189e0..22c95c8a8 100644 --- a/frontend_nuxt/assets/global.css +++ b/frontend_nuxt/assets/global.css @@ -179,7 +179,9 @@ body { .info-content-text pre .line-numbers { counter-reset: line-number 0; - width: 2em; + white-space: nowrap; /* 禁止数字换行 */ + font-variant-numeric: tabular-nums; /* 数字等宽 */ + /* width: 2em; */ font-size: 13px; position: sticky; flex-shrink: 0; diff --git a/frontend_nuxt/pages/index.vue b/frontend_nuxt/pages/index.vue index 0b4b69de6..e49c0d387 100644 --- a/frontend_nuxt/pages/index.vue +++ b/frontend_nuxt/pages/index.vue @@ -537,16 +537,22 @@ watch([selectedCategory, selectedTags], ([newCategory, newTags]) => { .article-comments, .header-item.comments { width: 5%; + justify-content: flex-end; + text-align: right; } .article-views, .header-item.views { width: 5%; + justify-content: flex-end; + text-align: right; } .article-time, .header-item.activity { width: 10%; + justify-content: flex-end; + text-align: left; } .article-item-title {