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

linear-gradient attribute cannot be overwritten #570

Open
1 task done
wqRan opened this issue Mar 9, 2024 · 0 comments
Open
1 task done

linear-gradient attribute cannot be overwritten #570

wqRan opened this issue Mar 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wqRan
Copy link

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

设置背景色为linear-gradient后,无法覆盖颜色

Code example

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
</head>
<head>
<style>
  .button {
      padding: 20px;
      display: inline-block;
      text-align: center;
      vertical-align: middle;
      margin: 10px;
      background: linear-gradient(to right, red, blue)
    }
    .button.active {
      background: #ccc;
    }
</style>
</head>

<body>
  <div class="button">按钮正常态</div>
  <div class="button" id="myButton" >点击按钮 按钮按下态</div>
<script>
  var button = document.getElementById('myButton');
  button.addEventListener('mousedown', function() {
    button.classList.add('active');
  });
  button.addEventListener('mouseup', function() {
      button.classList.remove('active');
  });
</script>
</body>

</html>

Expected results

WechatIMG114

Actual results

WechatIMG115

@wqRan wqRan added the bug Something isn't working label Mar 9, 2024
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