fix: set logo background opaque when fade in #824
Merged
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.
#823
在切换最后一张 Logo 图片(如果有复数的话)的渐入过程中,能隐约看到主页面,这应该是不符合预期的。直接使用本仓库的模板就能直接复现这个问题。
下面有一个演示目前问题的 gif,如果加载不出来可以点击链接下载查看。
从渐入渐出的实现上看,在 Logo 图片渐入的过程中,白底背景就开始渐出,使得在 0% ~ 35% 这段动画中,会有一小段时间 Logo 层是半透明的,可以隐约看到主页面。
我的想法是让白底背景在 Logo 图片渐入的过程中保持不透明,不知道这样修复是否合适。
@keyframes change-img-anim { 0%{ opacity: 0; } 35%{ opacity: 1; } 65%{ opacity: 1; } 99%{ opacity: 0; } 100%{ opacity: 0; display: none; } } @keyframes fadeout { 0%{ opacity: 1; } + 65%{ + opacity: 1; + } 99%{ opacity: 0; } 100%{ opacity: 0; display: none; } }下面有一个演示修复后效果的 gif,如果加载不出来可以点击链接下载查看。