css实现点状时钟走动动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现点状时钟走动动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { border: 0; box-sizing: border-box; margin: 0; padding: 0; } :root { --bg: #e3e4e8; --fg: #17181c; font-size: calc(16px + (24 - 16) * (100vw - 320px) / (1280 - 320)); } body { background: var(--bg); color: var(--fg); display: grid; font: 1em/1.5 sans-serif; place-items: center; height: 100vh; } .pl { position: relative; width: 12em; height: 12em; } .pl__dot { background: currentColor; position: absolute; top: calc(50% - 0.5em); left: calc(50% - 0.25em); width: 0.5em; height: 0.5em; transform-origin: 50% 100%; } .pl__dot:nth-child(1) { animation: dot1 8s linear infinite; transform: rotate(0deg) translateY(-5.5em); } .pl__dot:nth-child(2) { animation: dot2 8s linear infinite; transform: rotate(30deg) translateY(-5.5em); } .pl__dot:nth-child(3) { animation: dot3 8s linear infinite; transform: rotate(60deg) translateY(-5.5em); } .pl__dot:nth-child(4) { animation: dot4 8s linear infinite; transform: rotate(90deg) translateY(-5.5em); } .pl__dot:nth-child(5) { animation.........完整代码请登录后点击上方下载按钮下载查看
网友评论0