css模拟时钟指针运动效果
代码语言:html
所属分类:动画
代码描述:css模拟时钟指针运动效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; } .clock { position: absolute; width: 300px; height: 300px; border: 20px solid #b06a26; border-radius: 50%; left: 50%; top: 50%; background: #fefbf2; transform: translate(-50%, -50%); box-shadow: inset 0px 0px 10px black; } .clock::before { position: absolute; content: ''; height: 130px; width: 10px; background: black; top: 50%; left: calc(50% - 5px); border-radius: 5px; animation: spin 6s linear infinite; transform-origin: top; } .clock::after { position: absolute; content: ''; height: 100px; width: 10px; background: black; top: 50%; left: calc(50% - 5px); border-radius: 5px; animatio.........完整代码请登录后点击上方下载按钮下载查看
网友评论0