css实现跳动的爱心动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现跳动的爱心动画效果代码

代码标签: 爱心 动画 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
  
<style>
@-webkit-keyframes beat {
  0% {-webkit-transform: scale(1)
    rotate(225deg); -webkit-box-shadow:0 0
      40px rgba(213,9,60,1);}
  50% {-webkit-transform: scale(1.1)
    rotate(225deg); -webkit-box-shadow:0 0
      70px rgba(213,9,60,0.6);}
  100% {-webkit-transform: scale(1)
    rotate(225deg); -webkit-box-shadow:0 0 
      40px rgba(213,9,60,1);}
}

@-moz-keyframes beat {
  0% {-moz-transform: scale(1)
    rotate(225deg); -moz-box-shadow:0 0
      40px rgba(213,9,60,1);}
  50% {-moz-transform: scale(1.1)
    rotate(225deg); -moz-box-shadow:0 0
      70px rgba(213,9,60,0.6);}
  100% {-moz-transform: scale(1)
    rotate(225deg); -moz-box-shadow:0 0 
      40px rgba(213,9,60,1);}
}

@keyframes beat {
  0% {transform: scale(1)
    rotate(225deg); box-shadow:0 0
      40px rgba(213,9,60,1);}
  50% {transform: scale(1.1)
    rotate(225deg); box-shadow:0 0
      70px rgba(213,9,60,0.6);}
  100% {transform: scale(1)
    rotate(225deg); box-shadow:0 0 
      40px rgba(213,9,60,1);}
}

#background {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  background: #ffa5a5;
  background: -moz-linear-gradient(top, #ffa5a5 0%, #ffd3d3 100%);
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffa5a5), color-stop(100%,#ffd3d3));
  background: -webkit-linear-gradient(top, #ffa5a5 0%,#ffd3d3 100%);
  background: linear-gradient(top, #ffa5a5 0%, #ffd3d3 100%);
}

#chest {
  position: relative;
  width: 500px;
  height: 450px;
  margin: 0 auto;
}

.heart {
  position: absolute;
  z-index: 2;
  background: -moz-linear-gradient(-180deg, #f50a45 0%, #d5093c 40%.........完整代码请登录后点击上方下载按钮下载查看

网友评论0