Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个修复是正确的,它解决了背景过早淡出的问题。
为了提高代码的可维护性,并使两个动画(
change-img-anim和fadeout)之间的时间关系更明确,建议将关键的时间点(如65%)提取为 SCSS 变量。这样,如果将来需要调整动画时间,只需修改变量即可,可以避免不同步的问题。例如,可以这样做:
这只是一个关于代码可维护性的建议,当前实现的功能是完全正确的。