Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/Player/PlayerLyric/AMLyric.vue
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ watch(lyricPlayerRef, (player) => {
}
}

:deep(.am-lyric div[class*="lyricMainLine"] span) {
text-align: start;
}
Comment on lines +241 to +243
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

text-align 属性仅对块级容器(如 div)或 display 值为 blockinline-blockflex 等的元素生效。<span> 元素默认为 inline,因此 text-align: start; 这条规则对它本身没有效果。在下面的规则中,span[class*="romanWord"]display 被设置为 flex,这使其成为一个块级容器,所以 text-align 会对它生效。然而,对于此选择器匹配到的其他 <span> 元素,这条规则将是无效的。为了确保所有目标元素都能正确对齐,建议将此样式与 display 属性的更改结合使用,或者将 text-align 应用于其父级块状元素上。


:lang(ja) {
font-family: var(--ja-font-family);
}
Expand Down