Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

1.2 KB
Raw Blame
<!DOCTYPE html>
<html>
<head>
  <title>WAAPI eases tests / anime.js</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link href="../../assets/css/styles.css" rel="stylesheet">
  <style>
    body {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      width: 100%;
      height: 100vh;
    }
    #demo {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
    }
    .animation {
      position: absolute;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 2rem;
      width: 100%;
      height: 100%;
    }
    .square {
      --border-radius: 10px;
      position: absolute;
      width: 5rem;
      height: 5rem;
      top: 50%;
      left: 50%;
      margin-top: -2.5rem;
      margin-left: -2.5rem;
      background-color: currentColor;
    }
  </style>
</head>
<body>
  <div id="demo">
    <div class="animation"></div>
  </div>
  <script type="module" src="./index.js"></script>
</body>
</html>