jquery+css实现复制到剪贴板动画效果代码
代码语言:html
所属分类:动画
代码描述:jquery+css实现复制到剪贴板动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { min-height: 100vh; display: flex; justify-content: center; align-items: center; background: black; } * { box-sizing: border-box; } .clipboard { width: 32px; height: 32px; padding: 8px; transform: scale(2); border-radius: 6px; cursor: pointer; transition: background 0.2s ease; } .clipboard svg { opacity: 0.9; transition: opacity 0.2s ease; } .clipboard svg path { stroke-width: 1.5; stroke: white; fill: black; stroke-linecap: round; stroke-linejoin: round; } .clipboard svg path.page { transform-origin: center; } .clipboard svg path.check { transform-origin: center; stroke-dasharray: 8; stroke-dashoffset: 8; stroke: #83F5AD; } .clipboard:hover { background: rgba(255, 255, 255, 0.1); } .clipboard:hover svg { opacity: 1; } .clipboard.copied svg path.page { animation: copiedPage 2s ease forwards; } .clipboard.copied svg path.check { stroke-dasharray: 16; transition: all 0.5s ease; animation: copiedPage 2s ease forwards; } @keyframes copiedPage { 0% { transform: rotate(0) translateY(0); opacity: 1; } 50% { transform: rotate(0) translateY(0); opacity: 1; } 100% { transform: rotate(10deg) tran.........完整代码请登录后点击上方下载按钮下载查看
网友评论0