svg+css实现翻书动画效果代码

代码语言:html

所属分类:动画

代码描述:svg+css实现翻书动画效果代码

代码标签: svg css 翻书 动画

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

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

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

  
  
<style>
body {
  background-color: #2f3136;
}
.main {
  display: flex;
  justify-content: center;
	align-items: center;
  width: 100%;
  height: 240px;
}
.file-sight {
  display: flex;
  justify-content: center;
	align-items: center;
  width: 100px;
  height: 100px;
  border-radius: 12px;
  background-color: #1e2124;
}

#file-sight-movepath {
	animation-delay: 2s;
	animation: path 1.5s infinite ease-in;
}

@keyframes path {
	20% {
		d:path('M6,18.154c12.285,0.178,29.812,8.875,29.812,8.875S49.875,11.164,60.875,9.748');
	}
	50% {
		d:path('M6,18.154c12.285,0.178,29.812,8.875,29.812,8.875S43.458,6.496,51.041,3.081');
	}
	55% {
		d:path('M35.812,0.553v26.112c0,0-20.188-8.511-29.812-8.875');
	}
	65% {
		d:path('M6,18.154c12.285,0.178,28.458,8.011,28.458,8.011S27.625,5.413,20.375,3.081');
	}
	80% {
		d:path('M6,18.154c10.626,0,27.029,7.579,27.029,7.579S24.708,12.416,11.958,9.748');
	}
	90% {
		d:path('M6,18.154c14.229,0,29.812,8.511,29.812,8.511');
	}
	100% {
		d:path('M6,18.154c12.285,0.178,29.812,8.875,29.812,8.875s17.938-8.875,29.312-8.867');
	}
}
</style>


  
  
</head>

  <body>
<div class="main">
<div class="file-sight">
		<svg version="1.1" id="file-sight-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
											 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0