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

Animation and background are not effective when combined with linear gradient #568

Open
1 task done
wqRan opened this issue Mar 9, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@wqRan
Copy link
Collaborator

wqRan commented Mar 9, 2024

Affected version

0.16.0-beta.4

Flutter versions

3.16.0

No same issues found.

  • Yes, I search all issues but not found.

Steps to Reproduce

Animation 和 background 是 linear-gradient 时,渐变动画不生效

Code example

<style> .skeleton { height: 200px; width: 200px; animation-duration: 1s; animation-fill-mode: forwards; animation-iteration-count: infinite; animation-name: placeHolderShimmer; animation-timing-function: linear; background: #f6f7f8; background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%); background-size: 800px 104px; position: relative; } @Keyframes placeHolderShimmer{ 0% { background-position: -468px 0 } 100% { background-position: 468px 0 } } </style>

Expected results

渐变动画动起来

Actual results

渐变动画未生效

@wqRan wqRan added the bug Something isn't working label Mar 9, 2024
@wqRan
Copy link
Collaborator Author

wqRan commented Mar 9, 2024

代码如下

<!DOCTYPE html>
<html>
<head>
    <style>
  .skeleton {
    height: 200px;
    width: 200px;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-name: placeHolderShimmer;
    animation-timing-function: linear;
    background: #f6f7f8;
    background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
    background-size: 800px 104px;
    position: relative;
  }
  @keyframes placeHolderShimmer{
    0% {
      background-position: -468px 0
    }
    100% {
      background-position: 468px 0
    }
  }
    </style>
</head>
<body>
<div class="container">
  <div class="skeleton">

  </div>
</div>
</body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant