jQuery文章章节全屏动画切换效果

jQuery文章章节全屏动画切换效果-精品资源网
jQuery文章章节全屏动画切换效果
此内容为免费资源,请登录后查看
0
免费资源

jQuery文章章节全屏动画切换效果

jQuery文章章节全屏动画切换效果是一款鼠标点击按钮网页平滑过渡动画全屏切换特效。

js代码

<script>
$(function () {
	\'use strict\';
	var main = $(\'.main\'), about = $(\'.aboutSection\');
	$(\'.about\').click(function () {
		main.animate({
			\'height\': \'0\',
			\'top\': \'50vh\',
			\'padding\': \'0\'
		}, 300).animate({
			\'width\': \'2px\',
			\'left\': \'50%\'
		}, 900).fadeOut(200, function () {
			about.fadeIn(200);
			about.animate({
				\'width\': \'100%\',
				\'left\': \'0\'
			}, 900);
			about.animate({
				\'min-height\': \'100vh\',
				\'top\': \'0\',
				\'padding-top\': \'50px\',
				\'padding-bottom\': \'50px\'
			}, 300);
		});
	});
	$(\'.home\').click(function () {
		about.animate({
			\'min-height\': \'0\',
			\'height\': \'0\',
			\'top\': \'50vh\',
			\'padding\': \'0\'
		}, 300).animate({
			\'width\': \'2px\',
			\'left\': \'50%\'
		}, 900).fadeOut(200, function () {
			main.fadeIn(200).animate({
				\'width\': \'100%\',
				\'left\': \'0\'
			}, 900).animate({
				\'height\': \'100vh\',
				\'top\': \'0\',
				\'padding-top\': \'100px\',
				\'padding-bottom\': \'100px\'
			}, 300);
		});
	});
});
</script>

© 版权声明
THE END
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容