jQuery动画登录注册表单切换代码

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 jQuery动画登录注册表单切换代码 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

jQuery动画登录注册表单切换代码

HTML代码(index.html):

<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<title>jQuery动画登录注册表单切换代码</title>
<script src="js/jquery-2.2.4.min.js"></script>
<script>
	$(document).ready(function() {
		
		$(".form").slideDown(500);
		
		$("#landing").addClass("border-btn");

		$("#registered").click(function() {
			$("#landing").removeClass("border-btn");
			$("#landing-content").hide(500);
			$(this).addClass("border-btn");
			$("#registered-content").show(500);
			
		})

		$("#landing").click(function() {
			$("#registered").removeClass("border-btn");
			$(this).addClass("border-btn");
			
			$("#landing-content").show(500);
			$("#registered-content").hide(500);
		})
	});
</script>

<style>
	* {
		margin: 0;
		padding: 0;
		font-family: "微软雅黑";
	}
	
	body {
		background: #F7F7F7;
	}
	
	.form {
		position: absolute;
		top: 50%;
		left: 50%;
		margin-left: -185px;
		margin-top: -210px;
		height: 420px;
		width: 340px;
		font-size: 18px;
		-webkit-box-shadow: 0px 0px 10px #A6A6A6;
		background: #fff;
	}
	
	.border-btn {
		border-bottom: 1px solid #ccc;
	}
	
	#landing,
	#registered {
		float: left;
		text-align: center;
		width: 170px;
		padding: 15px 0;
		color: #545454;
	}
	
	#landing-content {
		clear: both;
	}
	
	.inp {
		height: 30px;
		margin: 0 auto;
		margin-bottom: 30px;
		width: 200px;
	}
	
	.inp>input {
		text-align: center;
		height: 30px;
		width: 200px;
		margin: 0 auto;
		transition: all 0.3s ease-in-out;
	}
	
	.login {
		border: 1px solid #A6A6A6;
		color: #a6a6a6;
		height: 30px;
		width: 202px;
		text-align: center;
		font-size: 13.333333px;
		margin-left: 70px;
		line-height: 30px;
		margin-top: 30px;
		transition: all 0.3s ease-in-out;
	}
	
	.login:hover {
		background: #A6A6A6;
		color: #fff;
	}
	
	#bottom {
		margin-top: 30px;
		font-size: 13.333333px;
		color: #a6a6a6;
	}
	
	#registeredtxt {
		float: left;
		margin-left: 80px;
	}
	
	#forgotpassword {
		float: right;
		margin-right: 80px;
	}
	
	#photo {
		border-radius: 80px;
		border: 1px solid #ccc;
		height: 80px;
		width: 80px;
		margin: 0 auto;
		overflow: hidden;
		clear: both;
		margin-top: 30px;
		margin-bottom: 30px;
	}
	
	#photo>img:hover {
		-webkit-transform: rotateZ(360deg);
		-moz-transform: rotateZ(360deg);
		-o-transform: rotateZ(360deg);
		-ms-transform: rotateZ(360deg);
		transform: rotateZ(360deg);
	}
	
	#photo>img {
		height: 80px;
		width: 80px;
		-webkit-background-size: 220px 220px;
		border-radius: 60px;
		-webkit-transition: -webkit-transform 1s linear;
		-moz-transition: -moz-transform 1s linear;
		-o-transition: -o-transform 1s linear;
		-ms-transition: -ms-transform 1s linear;
	}
	
	
	#registered-content {
		margin-top: 40px;
		display: none;
	}
	
	.fix {
		clear: both;
	}
	.form{
		display: none;
	}
</style>

</head>

<body>
<div class="form">
	<div id="landing">登陆</div>
	<div id="registered">注册</div>
	<div class="fix"></div>
	<div id="landing-content">
		<div id="photo"><img src="img/photo.jpg" /></div>
		<div class="inp"><input type="text" placeholder="用户名" /></div>
		<div class="inp"><input type="password" placeholder="密码" /></div>
		<div class="login">登录</div>
		<div id="bottom"><span id="registeredtxt">立即注册</span><span id="forgotpassword">忘记密码</span></div>
	</div>
	<div id="registered-content">
		<div class="inp"><input type="text" placeholder="请输入用户名" /></div>
		<div class="inp"><input type="password" placeholder="请输入密码" /></div>
		<div class="inp"><input type="password" placeholder="请再次输入密码" /></div>
		<div class="inp"><input type="text" placeholder="电子邮箱" /></div>
		<div class="login">立即注册</div>
	</div>
</div>
</body>
</html>








附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
65.28 KB
Html 表单代码2
最新结算
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jquery虚拟键盘中文打字效果js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
HTML5实现CSS滤镜图片切换特效代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery头像裁剪插件cropbox js代码
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
CSS3制作3D图片立方体旋转特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
jQuery+css3实现信封效果
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章