css3页面滚动aos.js插件元素动画



125 496 166



特效描述:css3页面滚动 aos.js插件 元素动画,css3页面滚动aos.js插件元素动画

代码结构

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css">
<link rel="stylesheet" href="dist/aos.css" />
<link rel="stylesheet" href="css/styles.css" />

2. 引入JS

<script type="text/javascript" src="js/jquery.1.7.1.min.js"></script>
<script type="text/javascript" src="dist/aos.js"></script>

3. HTML代码

<header class="hero">
	<div class="hero-center">
		<h1 style="font-family:Microsoft YaHei">页面滚动元素动画插件-aos.js</h1>
		<h2 class="hero__text" aos="fade-up" aos-easing="ease" aos-delay="400">Animate On Scroll <span>Library</span></h2>
	</div>
	<span class="hero__scroll" aos="fade-up" aos-easing="ease" aos-delay="800">
		Scroll down <br>
		<i class="chevron bottom"></i>
	</span>
</header>
<section class="section section--code">
	<div class="container">
		<h2 class="section-title">Fade</h2>
		<div class="code code--small code--left" aos="fade-up">
			<pre><code class="html">&lt;div aos="fade-up">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--right" aos="fade-down">
			<pre><code>&lt;div aos="fade-down">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--left" aos="fade-right">
			<pre><code>&lt;div aos="fade-right">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--right" aos="fade-left">
			<pre><code>&lt;div aos="fade-left">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--left" aos="fade-up-right">
			<pre><code>&lt;div aos="fade-up-right">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--right" aos="fade-up-left">
			<pre><code>&lt;div aos="fade-up-left">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--left" aos="fade-down-right">
			<pre><code>&lt;div aos="fade-down-right">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--right" aos="fade-down-left">
			<pre><code>&lt;div aos="fade-down-left">&lt;/div></code></pre>
		</div>
	</div>
</section>
<section class="section section--code">
	<div class="container">
		<h2 class="section-title">Flip</h2>
		<div class="code code--small code--left" aos="flip-left">
			<pre><code>&lt;div aos="flip-left">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--right" aos="flip-right">
			<pre><code>&lt;div aos="flip-right">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--left" aos="flip-up">
			<pre><code>&lt;div aos="flip-up">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--right" aos="flip-down">
			<pre><code>&lt;div aos="flip-down">&lt;/div></code></pre>
		</div>
	</div>
</section>
<section class="section section--code">
	<div class="container">
		<h2 class="section-title">Zoom</h2>
		<div class="code code--small code--left" aos="zoom-in">
			<pre><code>&lt;div aos="zoom-in">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--right" aos="zoom-in-up">
			<pre><code>&lt;div aos="zoom-in-up">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--left" aos="zoom-in-down">
			<pre><code>&lt;div aos="zoom-in-down">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--right" aos="zoom-in-left">
			<pre><code>&lt;div aos="zoom-in-left">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--left" aos="zoom-in-right">
			<pre><code>&lt;div aos="zoom-in-right">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--right" aos="zoom-out">
			<pre><code>&lt;div aos="zoom-out">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--left" aos="zoom-out-up">
			<pre><code>&lt;div aos="zoom-out-up">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--right" aos="zoom-out-down">
			<pre><code>&lt;div aos="zoom-out-down">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--left" aos="zoom-out-right">
			<pre><code>&lt;div aos="zoom-out-right">&lt;/div></code></pre>
		</div>
		<div class="code code--small code--right" aos="zoom-out-left">
			<pre><code>&lt;div aos="zoom-out-left">&lt;/div></code></pre>
		</div>
	</div>
</section>
<section class="section section--code">
	<div class="container">
		<h2 class="section-title">Different settings examples</h2>
		<div class="code code--left" aos="fade-up" aos-duration="3000">
			<pre><code>&lt;div aos="fade-up"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-duration="3000">&#13;&lt;/div></code></pre>
		</div>
		<div class="code code--right" aos="fade-down" aos-easing="linear" aos-duration="1500">
			<pre><code>&lt;div aos="fade-down"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-easing="linear"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-duration="1500">&#13;&lt;/div></code></pre>
		</div>
		<div id="example-anchor" class="code code--left" aos="fade-right" aos-offset="300" aos-easing="ease-in-sine">
			<pre><code>&lt;div aos="fade-right"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-offset="300"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-easing="ease-in-sine">&#13;&lt;/div></code></pre>
		</div>
		<div class="code code--right" aos="fade-left" aos-anchor="#example-anchor" aos-offset="500" aos-duration="500">
			<pre><code>&lt;div aos="fade-left"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-anchor="#example-anchor"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-offset="500"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-duration="500">&#13;&lt;/div></code></pre>
		</div>
		<div class="code code--left" aos="fade-zoom-in" aos-easing="ease-in-back" aos-delay="300" aos-offset="0">
			<pre><code>&lt;div aos="fade-zoom-in"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-easing="ease-in-back"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-delay="300"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-offset="0">&#13;&lt;/div></code></pre>
		</div>
		<div class="code code--right" aos="flip-left" aos-easing="ease-out-cubic" aos-duration="2000">
			<pre><code>&lt;div aos="flip-left"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-easing="ease-out-cubic"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-duration="2000">&#13;&lt;/div></code></pre>
		</div>
	</div>
</section>
<section class="section section--code">
	<div class="container">
		<h2 class="section-title">Anchor placement</h2>
		<div class="code code--wider code--left" aos="fade-up" aos-anchor-placement="top-bottom">
			<pre><code>&lt;div aos="fade-up"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-anchor-placement="top-bottom">&#13;&lt;/div></code></pre>
		</div>
		<div class="code code--wider code--right" aos="fade-up" aos-anchor-placement="center-bottom">
			<pre><code>&lt;div aos="fade-up"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-anchor-placement="center-bottom">&#13;&lt;/div></code></pre>
		</div>
		<div class="code code--wider code--left" aos="fade-up" aos-anchor-placement="bottom-bottom">
			<pre><code>&lt;div aos="fade-up"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-anchor-placement="bottom-bottom">&#13;&lt;/div></code></pre>
		</div>
		<div class="code code--wider code--right" aos="fade-up" aos-anchor-placement="top-center">
			<pre><code>&lt;div aos="fade-up"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-anchor-placement="top-center">&#13;&lt;/div></code></pre>
		</div>
		<div class="code code--wider code--left" aos="fade-up" aos-anchor-placement="center-center">
			<pre><code>&lt;div aos="fade-up"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-anchor-placement="center-center">&#13;&lt;/div></code></pre>
		</div>
		<div class="code code--wider code--right" aos="fade-up" aos-anchor-placement="bottom-center">
			<pre><code>&lt;div aos="fade-up"&#13;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aos-anchor-placement="bottom-center">&#13;&lt;/div></code></pre>
		</div>
	</div>
</section>
<script type="text/javascript">
	AOS.init({
		easing: 'ease-out-back',
		duration: 1000
	});
</script>
<script>
	$('.hero__scroll').on('click', function(e) {
		$('html, body').animate({
			scrollTop: $(window).height()
		}, 1200);
	});
</script>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 滚动 滚动条 页面滚动 滚动插件 滚动条插件 滚动条美化 加载动画 自动滚动图片轮播 h5弹窗动画 html5弹窗动画 h5动画 h5背景动画 h5场景动画 h53D动画 h5界面动画 html5动画 h5按钮动画 html5按钮动画 h5图片动画 h5图标动画 html5图片动画 html5图标动画 全屏滚动

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到