Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HowTo fadeIn animation #1833

Open
LLloody opened this issue Sep 7, 2024 · 1 comment
Open

HowTo fadeIn animation #1833

LLloody opened this issue Sep 7, 2024 · 1 comment
Labels

Comments

@LLloody
Copy link

LLloody commented Sep 7, 2024

Describe The Bug

I have an element that should start with 0 opacity:
#fldStatus {
opacity: 0.0;
animation: fadeIn;
animation-delay: 3000ms;
animation-duration: 2000ms;
width: 100%;
display: inline-grid;
padding: 2px 0px 0px 0px;
margin: 0px;
}
this works fine but after the animation completes, the element reverts back to opacity:0

Steps To Reproduce

No response

Expected Behavior

Please explain the fadeIn animations for dopes like me :)

Screenshots

No response

Desktop

No response

Smartphone

No response

Additional Context

No response

@LLloody LLloody added the bug label Sep 7, 2024
@TejasNarkhede
Copy link

Hey @LLloody
It seems like your issue is that after the animation completes, the element's opacity returns to 0 instead of staying at 1 or (your desired value)

You can try this changes, add forwards so the element will retain opacity: 1
this makes element stay as it as...

animation: fadeIn;
animation: fadeIn forwards;

add
@Keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

I hope it helps...

opacity1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants