anime实现红心点赞发散动画效果代码

代码语言:html

所属分类:动画

代码描述:anime实现红心点赞发散动画效果代码

代码标签: 点赞 发散 动画 效果

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

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

<head>
<meta charset="UTF-8">

<style>
    html,
body {
  height: 100%;
  background: #ffe2ea;
  overflow: hidden;
  padding:0;
  margin:0;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}



/*  主要样式 */
.like {
  margin-top: -38px;
  position: relative;
}
.like .heart {
  position: absolute;
  top: -10px;
  left: -11px;
  z-index: 1;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  pointer-events: none;
  display: none;
}
.like .line {
  fill: none;
}
.like .second {
  fill: #c50000;
  -webkit-transform: scale(0);
          transform: scale(0);
  -webkit-transform-origin: 53% 61% 0px;
          transform-origin: 53% 61% 0px;
}
.like .main {
  stroke: #c50000;
  stroke-width: 5px;
  fill: #ffe2ea;
  -webkit-transform-origin: 50% 50%;
          transform-origin: 50% 50%;
}
.like svg {
  transition: all .2s ease-in-out;
  position: relative;
  overflow: visible;
  z-index: 2;
  cursor: pointer;
}
</style>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/anime.3.0.1.js"></script>

</head>

<body>

<div class="controls__item like">
	<svg width="397" height="470" version="1">
		<path class="main" d="M211 226c9-9 21-14 34-14 29 0 50 26 50 54 0 34-53 77-78 95-5 3-7 3-12 0-25-18-78-61-78-95 0-28 21-54 50-54 13 0 25 5 34 14z"/>
		<path class="second" d="M211 226c9-9 21-14 34-14 29 0 50 26 50 54 0 34-53 77-78 95-5 3-7 3-12 0-25-18-78-61-78-95 0-28 21-54 50-54 13 0 25 5 34 14z"/>
		
		<path class="line line1" d="M171 294c-43-12-106-47-111-62-18-52 0-125 0-125"/>
		<path class="line line2" d="M197 244c-11-31-25-75-32-119-12-79-5-125-5-125"/>
		<path class="line line3" d="M258 251c23-18 49-43 61-67 25-50 19-74 13-153"/>
		<path class="line line4" d="M246 304c22 15 54 34 79 37 46 7 58-53 62-88s-8-96-8-96"/>
		<path class="line line5" d="M217 330c6 36 23 85 62 111 69 46 117-56 117-56"/>
		<path class="line line6" d="M204 330c-9 46-25 112-46 134-34 35-66-111-66-111"/>
		<path class="line line7" d="M191 309c-24 25-69 63-108 74C15 402 0 234 0 234"/>
	</svg>
	
	<img class="heart heart1" src="//repo.bfw.wiki/bfwrepo/icon/5d834be1e8f47.png" width="40" alt="">
	<img class="heart heart2" src="//repo.bfw.wiki/bfwrepo/icon/5d834be1e8f47.png" width="40" alt="">
	<img class="heart heart3" src="//repo.bfw.wiki/bfwrepo/icon/5d834be1e8f47.png" width="40" alt="">
	<img class="heart heart4" src="//repo.bfw.wiki/bfwrepo/icon/5d834be1e8f47.png" width="40" alt="">
	<img class="heart heart5" src="//repo.bfw.wiki/bfwrepo/icon/5d834be1e8f47.png" width="40" alt="">
	<img class="heart heart6" src="//repo.bfw.wiki/bfwrepo/icon/5d834be1e8f47.png" width="40" alt="">
	<img class="heart heart7" src="//repo.bfw.wiki/bfwrepo/.........完整代码请登录后点击上方下载按钮下载查看

网友评论0