svg+css实现平底锅烹饪美食开关切换效果代码
代码语言:html
所属分类:动画
代码描述:svg+css实现平底锅烹饪美食开关切换效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; background: radial-gradient(circle at center, #b3d5c6, #a3ccba); } body svg { position: absolute; width: 0; height: 0; } body .wrap { width: 350px; height: 150px; min-width: 350px; position: relative; box-shadow: 0 0 0 10px #fff, 0 0 0 11px #88bda5, 0 0px 20px 15px #88bda5; background: #fff; border-radius: 100px; opacity: 0; -webkit-animation: fadein 0.5s ease-in-out 1 forwards; animation: fadein 0.5s ease-in-out 1 forwards; -webkit-animation-delay: 0.5s; animation-delay: 0.5s; } @-webkit-keyframes fadein { to { opacity: 1; } } @keyframes fadein { to { opacity: 1; } } body .wrap input { position: absolute; width: 100%; height: 100%; opacity: 0; z-index: 999; top: 0; left: 0; } body .wrap input:checked ~ .syrup:before { animation: drip 3.25s ease-out 1 forwards; -webkit-animation: drip 3.25s ease-out 1 forwards; } @keyframes drip { 0% { transform: translateY(-100vh); -webkit-clip-path: polygon(55% 0, 44% 1%, 39% 9%, 40% 15%, 39% 19%, 38% 24%, 37% 27%, 37% 31%, 39% 34%, 40% 36%, 43% 38%, 46% 39%, 50% 41%, 53% 39%, 55% 37%, 59% 35%, 63% 35%, 64% 31%, 61% 24%, 60% 16%, 59% 9%); clip-path: polygon(55% 0, 44% 1%, 39% 9%, 40% 15%, 39% 19%, 38% 24%, 37% 27%, 37% 31%, 39% 34%, 40% 36%, 43% 38%, 46% 39%, 50% 41%, 53% 39%, 55% 37%, 59% 35%, 63% 35%, 64% 31%, 61% 24%, 60% 16%, 59% 9%); } 80% { transform: translateY(-100vh); -webkit-clip-path: polygon(55% 0, 44% 1%, 39% 9%, 40% 15%, 39% 19%, 38% 24%, 37% 27%, 37% 31%, 39% 34%, 40% 36%, 43% 38%, 46% 39%, 50% 41%, 53% 39%, 55% 37%, 59% 35%, 63% 35%, 64% 31%, 61% 24%, 60% 16%, 59% 9%); clip-path: polygon(55% 0, 44% 1%, 39% 9%, 40% 15%, 39% 19%, 38% 24%, 37% 27%, 37% 31%, 39% 34%, 40% 36%, 43% 38%, 46% 39%, 50% 41%, 53% 39%, 55% 37%, 59% 35%, 63% 35%, 64% 31%, 61% 24%, 60% 16%, 59% 9%); } 90% { transform: translateY(0vh); -webkit-clip-path: polygon(55% 0, 44% 1%, 39% 9%, 40% 15%, 39% 19%, 38% 24%, 37% 27%, 37% 31%, 39% 34%, 40% 36%, 43% 38%, 46% 39%, 50% 41%, 53% 39%, 55% 37%, 59% 35%, 63% 35%, 64% 31%, 61% 24%, 60% 16%, 59% 9%); clip-path: polygon(55% 0, 44% 1%, 39% 9%, 40% 15%, 39% 19%, 38% 24%, 37% 27%, 37% 31%, 39% 34%, 40% 36%, 43% 38%, 46% 39%, 50% 41%, 53% 39%, 55% 37%, 59% 35%, 63% 35%, 64% 31%, 61% 24%, 60% 16%, 59% 9%); } 100% { transform: translateY(0vh); -webkit-clip-pat.........完整代码请登录后点击上方下载按钮下载查看
网友评论0