css实现有个水中火烈鸟眨眼睛展翅动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现有个水中火烈鸟眨眼睛展翅动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { padding: 0; margin: 0; box-sizing: border-box; } :root { --background: #fff; --scale: 100px; --transition: cubic-bezier(0, 0.46, 0, 1); --darkpink: #f18aab; --lightpink: #f12b64; } html, body { height: 100%; } body { width: 100%; display: flex; justify-content: center; align-items: center; flex-direction: column; font-family: "Poppins", sans-serif; color: #a6c5bb; background: var(--background); } .container { display: flex; justify-content: center; align-items: center; padding: 1rem 0; width: 492px; position: relative; transform: scale(0.8); } .flamingo { z-index: 2; position: relative; opacity: 1; width: 413px; height: 514px; transform: scale(0.8); } /* ---- Beak Start ---- */ .beak_dark { width: 70px; height: 56px; background: linear-gradient(#2b2b44, #0e041c); border-top-left-radius: 30px; position: absolute; left: 0; top: 0; z-index: 1; } .beak_light { width: 80px; height: 58px; background: linear-gradient(#fff, #b5d7d7); border-top-left-radius: 30px; border-bottom-right-radius: 30px; position: absolute; left: 45px; top: -1px; z-index: 2; overflow: hidden; } .beak_light:after { content: ""; position: absolute; width: 80px; height: 6px; background: linear-gradient(#9acbcc 102%, #fff0 90%); bottom: 0px; } .beak_head { width: 80px; height: 56px; background: var(--lightpink); border-top-right-radius: 30px; position: absolute; left: 70px; top: 0; z-index: 1; } .beak_head:after { content: ""; position: absolute; background: var(--lightpink); width: 40px; height: 40px; bottom: -40px; left: 5px; } .beak_head:before { content: ""; position: absolute; background: var(--background); border-top-right-radius: 50%; width: 40px; height: 60px; bottom: -60px; left: 4px; z-index: 2; } /* ---- Beak End ---- */ /* ---- Eye Start ---- */ .eye_lid { width: 55px; height: 55px; background: linear-gradient(var(--darkpink), var(--lightpink)); border-radius: 100%; position: absolute; left: 126px; top: 11px; z-index: 5; display: flex; justify-content: center; align-items: center; } .eye_ball { width: 45px; height: 45px; background: linear-gradient(#fff, #dfffff); border-radius: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; position: relative; animation: 5s blink infinite var(--transition); } .eye_ball:before { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 100%; background-color: #fff; top: 0px; left: 20px; } .eye_pupil { width: 35px; height: 35px; background: linear-gradient(#0a9ad1, #43f6dc); border-radius: 100%; display: flex; justify-content: center; align-items: center; } .eye_iris { width: 27px; height: 27px; background: linear-gradient(#083d9c, #083c9c00); border-radius: 100%; } /* ---- Eye End ---- */ /* ---- Neck Start ---- */ .neck { width: 36px; height: 155px; background: linear-gradient(var(--lightpink), var(--darkpink)); position: absolute; left: 114px; top: 50px; z-index: 1; } /* ---- Neck End ---- */ /* ---- Body Start ---- */ .body_body { width: 185px; height: 75px; background: linear-gradient( to bottom, var(--lightpink) 60%, var(--darkpink) 177% ); position: ab.........完整代码请登录后点击上方下载按钮下载查看
网友评论0