简单的小清新表单登录注册页面~~
2017-10-08 22:46
411 查看
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<title>document</title>
<link rel="stylesheet" type="text/css" href="css/normalize.css"/>
<link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css"/>
<style type="text/css">
*{margin: 0;padding: 0;}
.login-page{width: 360px;
padding: 8% 0 0;
margin: auto;}
.form{position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
margin: 0 auto 100px;
padding: 45px;
text-align: center;
box-shadow: 0 0 20px 0 rgba(0,0,0,0.2), 0 5px 5px 0 rgba(0,0,0,0.24);}
.form input{font-family: "Roboto",sans-serif;
outline: 0;
background: #f2f2f2;
width: 100%;
border: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;}
.form button{font-family: "Microsoft YaHei","Roboto",sans-serif;
text-transform: uppercase;
outline: 0;
background: #4CAF50;
width: 100%;
border: 0;
padding: 15px;
color: #FFFFFF;
font-size: 14px;
-webkit-transition:all 0.3 ease;
transition: all 0.3 ease;
cursor: pointer; }
.form button:hover,.form button:active,.form button:focus{
background: #43A047;
}
.form .message{margin: 15px 0 0;
color: #b3b3b3;
font-size: 12px;}
.form .message a{color: #4CAF50;
text-decoration: none;}
.form .register-form{
display: none;
}
body{background: #76b852;
background: -webkit-linear-gradient(right, #76b852, #8DC26F);
background: -moz-linear-gradient(right, #76b852, #8DC26F);
background: -o-linear-gradient(right, #76b852, #8DC26F);
background: linear-gradient(to left, #76b852, #8DC26F);
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; }
</style>
</head>
<body>
<div id="wrapper" class="login-page">
<div id="login_form" class="form">
<form class="register-form">
<input type="text" placeholder="用户名" id="rusername" value="" />
<input type="password" placeholder="密码" id="rpassword" value="" />
<input type="text" placeholder="电子邮件" id="email" value="" />
<button id="create">创建账户</button>
<p class="message">已经有了一个账户?<a href="#">立刻登录</a></p>
</form>
<form class="login-form">
<input type="text" placeholder="用户名" id="username" value="" />
<input type="password" placeholder="密码" id="password" value="" />
<button id="login">登 录</button>
<p class="message">还没有账户?<a href="#">立即创建</a></p>
</form>
</div>
</div>
<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
<script type="text/javascript">
$(function (){
$('.message a').click(function (){
$('form').animate({
height:'toggle',
opacity:'toggle',
},'slow');
});
$("#login").click(function(){
check_login();
return false;
});
$("#create").click(function(){
check_register();
return false;
})
})
function check_login(){
var name = $("#username").val();
var pass = $("#password").val();
if(name == "111" && pass == "111"){
alert("登录成功!");
$("#username").val("");
$("#password").val("");
}
}
function check_register(){
var name = $("#rusername").val();
var pass = $("#rpassword").val();
var email = $("#email").val();
if(name != null && pass != null && email != null){
alert("注册成功!");
$("#rusername").val("");
$("#rpassword").val("");
$("#email").val("");
}
}
</script>
</body>
</html>
<html>
<head>
<meta charset="utf-8" />
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<title>document</title>
<link rel="stylesheet" type="text/css" href="css/normalize.css"/>
<link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css"/>
<style type="text/css">
*{margin: 0;padding: 0;}
.login-page{width: 360px;
padding: 8% 0 0;
margin: auto;}
.form{position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
margin: 0 auto 100px;
padding: 45px;
text-align: center;
box-shadow: 0 0 20px 0 rgba(0,0,0,0.2), 0 5px 5px 0 rgba(0,0,0,0.24);}
.form input{font-family: "Roboto",sans-serif;
outline: 0;
background: #f2f2f2;
width: 100%;
border: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;}
.form button{font-family: "Microsoft YaHei","Roboto",sans-serif;
text-transform: uppercase;
outline: 0;
background: #4CAF50;
width: 100%;
border: 0;
padding: 15px;
color: #FFFFFF;
font-size: 14px;
-webkit-transition:all 0.3 ease;
transition: all 0.3 ease;
cursor: pointer; }
.form button:hover,.form button:active,.form button:focus{
background: #43A047;
}
.form .message{margin: 15px 0 0;
color: #b3b3b3;
font-size: 12px;}
.form .message a{color: #4CAF50;
text-decoration: none;}
.form .register-form{
display: none;
}
body{background: #76b852;
background: -webkit-linear-gradient(right, #76b852, #8DC26F);
background: -moz-linear-gradient(right, #76b852, #8DC26F);
background: -o-linear-gradient(right, #76b852, #8DC26F);
background: linear-gradient(to left, #76b852, #8DC26F);
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; }
</style>
</head>
<body>
<div id="wrapper" class="login-page">
<div id="login_form" class="form">
<form class="register-form">
<input type="text" placeholder="用户名" id="rusername" value="" />
<input type="password" placeholder="密码" id="rpassword" value="" />
<input type="text" placeholder="电子邮件" id="email" value="" />
<button id="create">创建账户</button>
<p class="message">已经有了一个账户?<a href="#">立刻登录</a></p>
</form>
<form class="login-form">
<input type="text" placeholder="用户名" id="username" value="" />
<input type="password" placeholder="密码" id="password" value="" />
<button id="login">登 录</button>
<p class="message">还没有账户?<a href="#">立即创建</a></p>
</form>
</div>
</div>
<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
<script type="text/javascript">
$(function (){
$('.message a').click(function (){
$('form').animate({
height:'toggle',
opacity:'toggle',
},'slow');
});
$("#login").click(function(){
check_login();
return false;
});
$("#create").click(function(){
check_register();
return false;
})
})
function check_login(){
var name = $("#username").val();
var pass = $("#password").val();
if(name == "111" && pass == "111"){
alert("登录成功!");
$("#username").val("");
$("#password").val("");
}
}
function check_register(){
var name = $("#rusername").val();
var pass = $("#rpassword").val();
var email = $("#email").val();
if(name != null && pass != null && email != null){
alert("注册成功!");
$("#rusername").val("");
$("#rpassword").val("");
$("#email").val("");
}
}
</script>
</body>
</html>
相关文章推荐
- javaWeb 简单注册登录(含数据库连接) -- (一)页面
- JSP web页面登陆注册 表单数据封装 流程总结(简单却容易在细节失误,所以需要严格的流程规范)
- 简单表格、 表单、登录页面bootstrap
- 简单清新的登录表单
- android -简单注册登录页面应用
- JSP作业3 - 使用JSP实现简单的用户登录注册页面
- 使用JS完成注册页面表单简单校验
- js带摇晃风格的小清新登录注册表单
- 表单练习——(简单的注册页面)
- 简单的注册表单页面
- 简单的注册登录页面
- 简单的注册表单页面
- 使用JDBC做一个简单的登录,注册页面!
- HTML简单登录和注册页面及input标签诠释
- 小白教程——Windows下用PHP写一个简单的登录注册页面(二)
- 一个简单的注册登录页面(包括阿里大于的手机验证)html+JS+AJAX+PHP
- JavaScript 注册登录页面的简单实现
- Django登录、注册和修改密码简单页面实现
- django学习(一) form表单编写简单的注册登录页
- 分享Bootstrap简单表格、表单、登录页面