纯css实现多边形组成的狐狸变螃蟹动物变形动画效果代码
代码语言:html
所属分类:动画
代码描述:纯css实现多边形组成的狐狸变螃蟹动物变形动画效果代码
代码标签: css 多边形 狐狸 变 螃蟹 动物 变形 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> html, body { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100vw; height: 100vh; background-color: #bbe3e3; } .wrapper { position: relative; width: 50vw; height: 50vw; max-width: 100vh; max-height: 100vh; } .pl { width: 100%; height: 100%; position: absolute; } .pl:hover { opacity: 0.5; } .castShadow { height: 40px; width: 320px; background-color: black; filter: blur(10px); border-radius: 50%; opacity: 0.45; animation: animateShadow 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(1) { animation: transform1 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(2) { animation: transform2 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(3) { animation: transform3 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(4) { animation: transform4 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(5) { animation: transform5 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(6) { animation: transform6 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(7) { animation: transform7 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(8) { animation: transform8 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(9) { animation: transform9 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(10) { animation: transform10 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(11) { animation: transform11 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(12) { animation: transform12 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(13) { animation: transform13 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(14) { animation: transform14 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(15) { animation: transform15 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(16) { animation: transform16 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(17) { animation: transform17 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(18) { animation: transform18 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(19) { animation: transform19 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } .wrapper .pl:nth-child(20) { animation: transform20 3s infinite alternate cubic-bezier(0.93, 0, 0.27, 1); } @keyframes transform1 { from { clip-path: polygon(33.862% 16.402%, 27.513% 21.693%, 26.455% 12.698%); background-color: #a93f32; } to { clip-path: polygon(41.267% 13.87%, 44.692% 25.685%, 40.411% 31.507%); background-color: #787681; } } @keyframes transform2 { from { clip-path: polygon(26.455% 12.698%, 15.873% 29.63%, 29.042% 35.921%); background-color: #d76644; } to { clip-path: polygon(41.267% 13.87%, 44.692% 25.685%, 52.397% 25.685%); background-color: #b7b6be; } } @keyframes transform3 { from { clip-path: polygon(15.873% 29.63%, 14.212% 40.411%, 31.5% 36.815%); background-color: #d76644; } to { clip-path: polygon(35.274% 38.356%, 44.692% 25.685%, 56.678% 50.685%); background-color: #eee7e7; } } @keyframes transform4 { from { clip-path: polygon(14.212% 40.411%, 21.164% 46.032%, 38.095% 35.45%); background-color: #e64d2d; } to { clip-path: polygon(44.692% 25.685%, 56.678% 50.685%, 68.322% 25.685%); background-color: #b7b6be; } } @keyframes transform5 { from { clip-path: polygon(38.095% 35.45%, 11.64% 51.323%, 41.27% 59.259%); background-color: #e64d2d; } to { clip-path: polygon(68.322% 25.685%, 56.678% 50.685%, 77.911% 38.356%); background-color: #eee7e7; } } @keyframes transform6 { from { clip-path: polygon(11.64% 51.323%, 38.356% 82.534%, 41.27% 59.259%); background-color: #e64d2d; } to { clip-path: polygon(71.404% 13.87%, 59.932% 25.685%, .........完整代码请登录后点击上方下载按钮下载查看
网友评论0