css+svg实现带生日歌男孩给女孩过生日动画效果代码

代码语言:html

所属分类:动画

代码描述:css+svg实现带生日歌男孩给女孩过生日动画效果代码

代码标签: css svg 生日歌 男孩 女孩 生日

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
@charset "UTF-8";
.swing, html .container .boy.dance, body .container .boy.dance, html .container .girl.dance, body .container .girl.dance {
  animation: 1.5s float ease-in-out alternate infinite;
}

html, body {
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
  over-flow: hidden;
}
html .container, body .container {
  background-color: #FF8C94;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}
html .container .cake, body .container .cake {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  top: -5px;
  left: -135px;
  z-index: 101;
}
html .container .cake .candle, body .container .cake .candle {
  position: relative;
  height: 20px;
  width: 5px;
  background-color: #fff;
  border-radius: 4px;
  z-index: 10;
}
html .container .cake #flame, body .container .cake #flame {
  position: absolute;
  z-index: 10;
}
html .container .cake .lit, body .container .cake .lit {
  background-color: #ffc950;
  width: 5px;
  height: 12px;
  filter: blur(1px);
  border-top-left-radius: 10px 35px;
  border-top-right-radius: 10px 35px;
  border-bottom-right-radius: 10px 10px;
  border-bottom-left-radius: 10px 10px;
  top: -15px;
  margin: auto;
  box-shadow: 0 0 17px 7px rgba(244, 231, 112, 0.71);
  transform-origin: bottom;
  animation: flicker 1s ease-in-out alternate infinite;
}
html .container .cake .off, body .container .cake .off {
  display: none;
}
html .container .cake #layer1, body .container .cake #layer1 {
  width: 50px;
  height: 20px;
  background-color: #715447;
}
html .container .cake #layer2, body .container .cake #layer2 {
  height: 10px;
  width: 100px;
  background-color: #ddd;
}
html .container .girl, body .container .girl {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: relative;
  top: 15px;
  left: 0px;
}
html .container .girl .hair, body .container .girl .hair {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  background-color: #424b54;
  border-top-left-radius: 120% 200%;
  border-top-right-radius: 120% 200%;
  z-index: 2;
  position: relative;
  top: 25px;
}
html .container .girl .face, body .container .girl .face {
  background-color: #fed9a5;
  width: 40px;
  height: 60px;
  border-radius: 100%;
  position: relative;
  top: -35px;
  z-index: 3;
}
html .container .girl .eye-brows, body .container .girl .eye-brows {
  position: relative;
  top: -80px;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  width: 30px;
}
html .container .girl .eye-brows .brow, body .container .girl .eye-brows.........完整代码请登录后点击上方下载按钮下载查看

网友评论0