html 代码:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>欢迎您,请先登录</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="../css/login.css" type="text/css">
</head>
<body>
<div class="all">
<div class="header">
<img src="../images/login/logo.png" alt="">
</div>
<div class="main">
<div class="bodys">
<div class="core">
<img src="../images/login/big.jpg" alt="">
</div>
<div class="right">
<div class="box">
<h2>登陆</h2>
<form name="reg" action="" onSubmit="return docheck()">
<div class="input_box">
<span class="font-set">用户名:</span><input name="regist_username" type="text" placeholder="请输入用户名"/>
</div>
<div class="input_box">
<span class="font-set">密 码:</span><input name="regist_password" type="password" placeholder="请输入密码">
</div>
<div class="input_box">
<input type="submit" class="btn-primary" value="登录"/>
<a href="regist.html"><input type="button" class="btn-primary" value="注册"></a>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="footer"></div>
</div>
<script type="text/javascript" src="../js/regist/regist.js"></script>
</body>
</html>
CSS代码:
@CHARSET "UTF-8";
*{
margin: 0;
padding: 0;
font-family: 微软雅黑;
font-size: 12px;
}
body{
background-color: #f5f5f5;
}
.all{
background-color: #f5f5f5;
}
.box{
width: 390px;
height: 430px;
border: solid 1px #ddd;
background: #f5f5f5;
position: absolute;
left: 50%;
top:42%;
margin-left: -195px;
margin-top: -160px;
text-align: center;
}
.box h2{
font-weight: normal;
color:#666;
font-size: 16px;
line-height: 40px;
overflow: hidden;
text-align: center;
border-bottom: solid 1px #ddd;
background: #f7f7f7;
}
.input_box{
width:350px;
padding-bottom: 15px;
margin: 0 auto;
overflow: hidden;
}
.font-set{
font-family: 微软雅黑;
font-size: 12px;
color: #0178a4;
}
.input_box input{
padding:10px 25px 10px 10px;
width:40%;
border:1px solid #79acff;
text-align:left;
outline:none;
font-size:12px;
/*background:url(../images/person.png) no-repeat 440px 10px;*/
margin-top:4%;
font-weight: bold;
font-family: 'Muli', sans-serif;
/*-- W3Layouts --*/
border-radius: 4px;
color: rgba(101, 101, 101, 0.61);
}
.input_box input[type="submit"]{
position: absolute;
bottom: 70px;
height: 44px;
width: 67px;
right: 150px;
font-family: 微软雅黑;
color: #656565;
}
.input_box input[type="button"]{
position: absolute;
bottom: 70px;
height: 44px;
width: 67px;
right: 80px;
font-family: 微软雅黑;
color: #656565;
font-weight: bold;
}
.header{
height: 60px;
width: 100%;
background-color: #f5f5f5;
}
.header img{
margin-left: 100px ;
margin-top: 10px;
width: 115px;
height: 64px;
}
.main{
margin-top: 30px;
float: left;
height: 470px;
width: 100%;
background-color: #fd7a72;
}
.footer{
float: left;
height: 125px;
width: 100%;
}
.bodys{
position: relative;
width: 974px;
height: 445px;
margin-left: 187px;
margin-top: 0px;
}
.core{
height: 416.5px;
width: 572px;
background-color: #f7f7f7;
margin-left: 0px;
margin-top: 0px;
}
.right{
position: absolute;
width: 390px;
height: 420px;
/*background-color: #f79926;*/
top:1px;
right: 1px;
}