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

动画相关 #25

Open
ckinmind opened this issue Jul 20, 2017 · 0 comments
Open

动画相关 #25

ckinmind opened this issue Jul 20, 2017 · 0 comments

Comments

@ckinmind
Copy link
Owner

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Egghead D3 v4</title>
  <script src="//d3js.org/d3.v4.min.js"></script>
  <style>
    #block {
      background: lightgray;
      border: 1px solid black;
      width: 100px;
      height: 100px;
    }
  </style>
</head>
<body>

  <div id="block"></div>

  <script src="src/app.js"></script>
</body>
</html>
d3.select('#block')
  .transition()
    .duration(600)
    .delay(750)
    .ease(d3.easeBounceOut)
    .style('width', '400px')
  .transition()
    .duration(600)
    .ease(d3.easeBounceOut)
    .style('height', '600px')
  .transition()
    .duration(2000)
    .ease(d3.easeQuadOut)
    .style('background-color', 'purple')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant