纯css打造万圣节ghost鬼飘动动画效果代码
代码语言:html
所属分类:动画
代码描述:纯css打造万圣节ghost鬼飘动动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } .container { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #00034b; } .ghost { position: relative; width: 150px; height: 225px; background: #ffffff; box-shadow: -17px 0px 0px #dbdbdb inset, 0 0 50px #5939db; border-radius: 100px 100px 0 0; animation: float 2s infinite; } .ghost__eyes { display: flex; justify-content: space-around; margin: 0 auto; padding: 70px 0 0; width: 90px; height: 20px; } .ghost__eyes:before, .ghost__eyes:after { content: ""; display: block; width: 15px; height: 25px; background: #00034b; border-radius: 50%; } .ghost__dimples { display: flex; justify-content: space-around; margin: 0 auto; padding: 35px 0 0; width: 130px; height: 20px; } .ghost__dimples:before, .ghost__dimples:after { content: ""; display: block; width: 15px; height: 15px; background: #ffbeff; border-radius: 50%; } .ghost__feet { width: 100%; position: absolute; bottom: -13px; display: flex; justify-content: space-between; } .ghost__feet-foot { width: 25%; height: 26px; border-radius: 50%; background: #ffffff; } .ghost__feet-foot:last-child { background-image: linear-gradient(to right, #ffffff 55%, #dbdbdb 45%); } .shadow { background: #000232; width: 150px; height: 40px; margin-top: 50px; border-radius: 50%; animation: shadow 2s infinite; } @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } } @keyframes shadow { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.9); } } /* --------Social Icons-------- */ /* Color Variables */ /* Social Icon Mixin */ .social-icons { display: flex; position: absolute; bottom: 25px; right: 25px; } .social-icon { display: flex; align-items: center; justify-content: center; position: relative; width: 40px; height: 40px; margin: 0 0.7rem; border-radius: 50%; cursor: pointer; font-.........完整代码请登录后点击上方下载按钮下载查看
网友评论0