Skip to content
New issue

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

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

Already on GitHub? # to your account

实现一个秒针绕一点转动的效果 #228

Open
Sunny-117 opened this issue Nov 4, 2022 · 1 comment
Open

实现一个秒针绕一点转动的效果 #228

Sunny-117 opened this issue Nov 4, 2022 · 1 comment

Comments

@Sunny-117
Copy link
Owner

No description provided.

@huccct
Copy link

huccct commented May 5, 2023

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style lang="css">
      .clock {
        width: 200px;
        height: 200px;
        border: 2px solid #000;
        border-radius: 50%;
        position: relative;
      }

      .hand {
        width: 1px;
        height: 100px;
        background-color: #000;
        position: absolute;
        top: 50%;
        left: 50%;
        transform-origin: center top;
        animation: 60s rotate linear infinite;
      }

      @keyframes rotate {
        100% {
          transform: rotate(360deg);
        }
      }
    </style>
  </head>
  <body>
    <div class="clock">
      <div class="hand"></div>
    </div>
  </body>
</html>

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

No branches or pull requests

2 participants