18种基于anime.js的文字动画特效

来源:https://www.sucaihuo.com/js/2891.html 2017-09-01 22:09浏览(2687) 收藏

一款18种基于anime.js的文字动画特效,每种特效都可以点击按钮切换文字查看效果,anime.js丰富的文字特效总能满足你的需求,另外,文字的字体颜色等都可以自由设置的。
18种基于anime.js的文字动画特效
分类:文字特效 > 文字动画 难易:初级
查看演示 下载资源 下载积分: 20 积分

页面的head部分,需远程调用google字体库,并引入页面的多个CSS样式文件,代码如下:

<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed|Arapey|Archivo+Black|Elsie+Swash+Caps|Playfair+Display|Anton|Rubik|Teko:600|Sacramento|Abril+Fatface|Cormorant+Garamond|Neucha|Unica+One|Old+Standard+TT" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="css/decolines.css" />
<link type="text/css" rel="stylesheet" href="css/normalize.css" />
<link type="text/css" rel="stylesheet" href="css/demo.css">
<link type="text/css" rel="stylesheet" href="css/lettereffect.css" />
<link type="text/css" rel="stylesheet" href="css/pater.css" />
<!--[if IE]>
		<script src="http://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->
<script>document.documentElement.className = 'js';</script>
<svg class="hidden">
	<defs>
		<symbol id="icon-arrow" viewBox="0 0 24 24">
			<title>arrow</title>
			<polygon points="6.3,12.8 20.9,12.8 20.9,11.2 6.3,11.2 10.2,7.2 9,6 3.1,12 9,18 10.2,16.8 "/>
		</symbol>
		<symbol id="icon-drop" viewBox="0 0 24 24">
			<title>drop</title>
			<path d="M12,21c-3.6,0-6.6-3-6.6-6.6C5.4,11,10.8,4,11.4,3.2C11.6,3.1,11.8,3,12,3s0.4,0.1,0.6,0.3c0.6,0.8,6.1,7.8,6.1,11.2C18.6,18.1,15.6,21,12,21zM12,4.8c-1.8,2.4-5.2,7.4-5.2,9.6c0,2.9,2.3,5.2,5.2,5.2s5.2-2.3,5.2-5.2C17.2,12.2,13.8,7.3,12,4.8z"/><path d="M12,18.2c-0.4,0-0.7-0.3-0.7-0.7s0.3-0.7,0.7-0.7c1.3,0,2.4-1.1,2.4-2.4c0-0.4,0.3-0.7,0.7-0.7c0.4,0,0.7,0.3,0.7,0.7C15.8,16.5,14.1,18.2,12,18.2z"/>
		</symbol>
		<symbol id="icon-cross" viewBox="0 0 24 24">
			<title>cross</title>
			<path d="M2.9,2.9l18.2,18.2 M2.9,21.1L21.1,2.9 M21.8,20.4L13.4,12l8.4-8.4l-1.4-1.4L12,10.6L3.6,2.2L2.2,3.6l8.4,8.4l-8.4,8.4l1.4,1.4l8.4-8.4l8.4,8.4L21.8,20.4z"/>
		</symbol>
	</defs>
</svg>
<main>
	<section class="content content--c1" id="section1">
		<a href="#section1" class="section-link">特效 1</a>
		<div class="slideshow slideshow--1" data-effect="fx1">
			<div class="slide slide--current"><h2 class="title title--style-1">Forever</h2></div>
			<div class="slide"><h2 class="title title--style-1">Glorious</h2></div>
			<div class="slide"><h2 class="title title--style-1">Timeless</h2></div>
			<div class="slide"><h2 class="title title--style-1">Love</h2></div>
		</div>
		<nav class="actions">
			<button class="btn btn--trigger btn--prev">上一个</button>
			<button class="btn btn--trigger btn--next">下一个</button>
		</nav>
	</section><!-- /content -->
	
<!-- 省略部分演示代码 -->

	<section class="content content--c3" id="section3">
		<a href="#section3" class="section-link">特效 3</a>
		<div class="slideshow slideshow--3" data-effect="fx2">
			<div class="slide slide--current"><h2 class="title title--style-3 title--centered">Freedom</h2></div>
			<div class="slide"><h2 class="title title--style-3 title--centered">Equality</h2></div>
			<div class="slide"><h2 class="title title--style-3 title--centered">Justice</h2></div>
			<div class="slide"><h2 class="title title--style-3 title--centered">Knowledge</h2></div>
		</div>
		<nav class="actions">
			<button class="btn btn--trigger btn--prev">上一个</button>
			<button class="btn btn--trigger btn--next">下一个</button>
		</nav>
	</section>
</main>

页面的底部,需引入多个JS文件,设置好滑动的相关参数,部分代码如下:

<script type="text/javascript" src="js/charming.min.js"></script>
<script type="text/javascript" src="js/anime.min.js"></script>
<script type="text/javascript" src="js/lineMaker.js"></script>
<script type="text/javascript" src="js/imagesloaded.pkgd.min.js"></script>
<script type="text/javascript" src="js/textfx.js"></script>
评论0
头像

系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791

1 2