div+css实现蝴蝶效应动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现蝴蝶效应动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { background: black; } .wrap { width: 100vh; height: 80vh; margin: 8vh auto; } .left, .right { width: 50%; height: 100%; position: absolute; overflow: hidden; } .left:before, .right:before { content: ""; display: block; width: 80px; height: 150px; border-radius: 50%; border-left: 3px solid #FFF; position: absolute; top: 15%; -webkit-transform: rotate(30deg) translateX(-20px); transform: rotate(30deg) translateX(-20px); -webkit-transform-origin: bottom right; transform-origin: bottom right; } .left { left: 0; -webkit-transform: scaleX(-1) translateX(100%); transform: scaleX(-1) translateX(100%); -webkit-transform-origin: 100% 0; transform-origin: 100% 0; } .right { right: 0; -webkit-transform-origin: 0 0; transform-origin: 0 0; } .circle { position: absolute; bottom: 65%; left: -5vh; width: 10vh; height: 10vh; border-radius: 50%; border: 1px solid #6e7fca; -webkit-transform-origin: 50% 100%; transform-origin: 50% 100%; } .circle:nth-child(1) { -webkit-animation: anim 30s 0.5s linear infinite; animation: anim 30s 0.5s linear infinite; } .circle:nth-child(2) { -webkit-animation: anim 30s 1s linear infinite; animation: anim 30s 1s linear infinite; } .circle:nth-child(3) { -webkit-animation: anim 30s 1.5s linear infinite; animation: anim 30s 1.5s linear infinite; } .circle:nth-child(4) { -webkit-animation: anim 30s 2s linear infinite; animation: anim 30s 2s linear infinite; } .circle:nth-child(5) { -webkit-animation: anim 30s 2.5s linear infinite; animation: anim 30s 2.5s linear infinite; } .circle:nth-child(6) { -webkit-animation: anim 30s 3s linear infinite; animation: anim 30s 3s linear infinite; } .circle:nth-child(7) { -webkit-animation: anim 30s 3.5s linear infinite; animation: anim 30s 3.5s linear infinite; } .circle:nth-child(8) { -webkit-animation: anim 30s 4s linear infinite; animation: anim 30s 4s linear infinite; } .circle:nth-child(9) { -webkit-animation: anim 30s 4.5s linear infinite; animation: anim 30s 4.5s linear infinite; } .circle:nth-child(10) { -webkit-animation: anim 30s 5s linear infinite; animation: anim 30s 5s linear infinite; } .circle:nth-child(11) { -webkit-animation: anim 30s 5.5s linear infinite; animation: anim 30s 5.5s linear infinite; } .circle:nth-child(12) { -webkit-animation: anim 30s 6s linear infinite; animation: anim 30s 6s linear infinite; } .circle:nth-child(13) { -webkit-animation: anim 30s 6.5s linear infinite; animation: anim 30s 6.5s linear infinite; } .circle:nth-child(14) { -webkit-animation: anim 30s 7s linear infinite; animation: anim 30s 7s linear infinite; } .circle:nth-child(15) { -webkit-animation: anim 30s 7.5s linear infinite; animation: anim 30s 7.5s linear infinite; } .circle:nth-child(16) { -webkit-animation: anim 30s 8s linear infinite; animation: anim 30s 8s linear infinite; } .circle:nth-child(17) { -webkit-animation: anim 30s 8.5s linear infinite; animation: anim 30s 8.5s linear infinite; } .circle:nth-child(18) { -webkit-animation: anim 30s 9s linear infinite; animation: anim 30s 9s linear infinite; } .circle:nth-child(19) { -webkit-animation: anim 30s 9.5s linear infinite; animation: anim 30s 9.5s linear infinite; } .circle:nth-child(20) { -webkit-animation: anim 30s 10s linear infinite; animation: anim 30s 10s linear infinite; } .circle:nth-child(21) { -webkit-animation: anim 30s 10.5s linear infinite; animation: anim 30s 10.5s linear infinite; } .circle:nth-child(22) { -webkit-animation: anim 30s 11s linear infinite; animation: anim 30s 11s linear infinite; } .circle:nth-child(23) { -webkit-animation: anim 30s 11.5s linear infinite; animation: anim 30s 11.5s linear infinite; } .circle:nth-child(24) { -webkit-animation: anim 30s 12s linear infinite; animation: anim 30s 12s linear infinite; } .circle:nth-child(25) { -webkit-animation: anim 30s 12.5s linear infinite; animation: anim 30s 12.5s linear infinite; } .circle:nth-child(26) { -webkit-animation: anim 30s 13s linear infinite; animation: anim 30s 13s linear infinite; } .circle:nth-child(27) { -webkit-animation: anim 30s 13.5s linear infinite; animation: anim 30s 13.5s linear infinite; } .circle:nth-child(28) { -webkit-animation: anim 30s 14s linear infinite; animation: anim 30s 14s linear infinite; } .circle:nth-child(29) { -webkit-animation: anim 30s 14.5s linear infinite; animation: anim 30s 14.5s linear infinite; } .circle:nth-child(30) { -webkit-animation: anim 30s 15s linear infinite; animation: anim 30s 15s linear infinite; } .circle:nth-child(31) { -webkit-animation: anim 30s 15.5s linear infinite; animation: anim 30s 15.5s linear infinite; } .circle:nth-child(32) { -webkit-animation: anim 30s 16s linear infinite; animation: anim 30s 16s linear infinite; } .circle:nth-child(33) { -webkit-animation: anim 30s 16.5s linear infinite; animation: anim 30s 16.5s linear infinite; } .circle:nth-child(34) { -webkit-animation: anim 30s 17s linear infinite; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0