css实现骷颅圣诞老人送礼物动画代码
代码语言:html
所属分类:动画
代码描述:css实现骷颅圣诞老人送礼物动画代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { padding: 0; margin: 0; } body { background: #9893bf; position: relative; height: 100%; width: 100%; } .container { position: relative; width: 500px; height: 500px; background: #1a1354; border-radius: 48% 52% 49% 51%/44% 44% 56% 56%; margin: auto; margin-top: 12vh; margin-bottom: 2rem; } .ground { position: absolute; width: 70%; height: 18%; border-radius: 43% 57% 33% 67%/55% 42% 58% 45%; background: white; z-index: 1; bottom: -1%; left: 15%; } .present { position: absolute; width: 9%; height: 9%; border-radius: 3px; background: #005c1d; top: 25.5%; left: 40%; z-index: 3; } .ribbon { position: absolute; width: 28%; height: 100%; background: #d6aa3a; left: 36%; } .bow { position: absolute; width: 30%; height: 30%; background: transparent; border: 4px solid #d6aa3a; border-radius: 30% 70% 0% 100%/30% 100% 0% 70%; } .bow1 { top: -35%; left: 5%; transform: rotate(-15deg); } .bow2 { top: -35%; left: 45%; transform: rotate(10deg) scaleX(-1); } svg { height: 22px; width: 22px; padding-top: 12px; padding-left: 3px; } svg:hover { cursor: pointer; } #pause { height: 19px; width: 19px; padding-bottom: 2px; } #icon-color { fill: #1a1354; } #player-container { position: absolute; width: 100px; height: 50px; background: white; border-radius: 49% 51% 71% 29%/54% 42% 58% 46%; right: 40px; top: -40px; text-align: center; z-index: 4; } .jack { position: absolute; width: 95%; height: 95%; left: 18%; top: 7%; z-index: 3; } .head { position: absolute; width: 11%; height: 11%; background: #e3e3e3; border-radius: 50% 50% 50% 50%/55% 55% 45% 45%; top: 11%; left: 16%; } .head-copy { position: absolute; width: 100%; height: 100%; border-radius: 50% 50% 50% 50%/55% 55% 45% 45%; background: #e3e3e3; z-index: 2; } .left-eye { position: absolute; width: 30%; height: 36%; border-radius: 60% 40% 53% 47%/50% 50% 50% 50%; background: #171717; top: 32%; left: 16%; transform: rotate(10deg); } .right-eye { position: absolute; width: 30%; height: 36%; border-radius: 60% 40% 53% 47%/50% 50% 50% 50%; background: #171717; top: 32%; left: 60%; transform: rotate(-10deg) scaleX(-1); } .left-nostril { position: absolute; width: 5%; height: 8%; border-radius: 0% 100% 25% 75%/0% 75% 25% 100%; background: #171717; top: 65%; left: 48%; transform: scaleX(-1); } .right-nostril { position: absolute; width: 5%; height: 8%; border-radius: 0% 100% 25% 75%/0% 75% 25% 100%; background: #171717; top: 65.5%; left: 58%; transform: scaleX(1); } .smile { position: absolute; width: 90%; height: 60%; border-radius: 50%; border: 1px solid; background: transparent; border-color: transparent transparent #171717 transparent; top: 26%; left: 5%; } .stitch { position: absolute; width: 1px; height: 20%; background: #171717; } .s1 { top: 76%; left: 15%; } .s2 { top: 83%; left: 28%; } .s3 { top: 88%; left: 41%; } .s4 { top: 90%; left: 54%; } .s5 { top: 87%; left: 67%; } .s6 { top: 80%; left: 80%; } .hat-front { position: absolute; width: 87%; height: 65%; background: #A01A21; border-radius: 30% 70% 50% 50%/100% 100% 0% 0%; top: -45%; left: 7%; z-index: 2; } .hat-tail { position: absolute; width: 70%; height: 140%; border-radius: 50%; background: #A01A21; z-index: -1; left: -25%; top: -51%; transform: rotate(30deg); z-index: 1; } .hat-tip { position: absolute; width: 40%; height: 50%; background: #A01A21; clip-path: polygon(50% 100%, 0 0, 100% 0); top: 58%; left: -60%; transfo.........完整代码请登录后点击上方下载按钮下载查看
网友评论0