1. vue+elementUI
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>登录</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333333;
background-color: rgb(252, 248, 248);
text-align: center;
}
a {
cursor: pointer;
color: rgb(34, 144, 240);
}
.bind {
width: 300px;
display: inline-block;
}
.title {
margin: 50px 0px;
font-size: 20px;
width: inherit;
height: 35px;
}
.bind-form {
margin-top: 100px;
padding: 0 20px;
background-color: #FFF;
border: 1px solid #DCDFE6;
}
</style>
<script type="text/javascript" language="JavaScript">
</script>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
<div class="bind">
<div class="bind-form">
<div class="title">管理系统登录</div>
<el-form>
<el-form-item label="" size="normal">
<el-input v-model="form.username" placeholder="请输入账号" size="normal" clearable @change="">
</el-input>
</el-form-item>
<el-form-item label="" size="normal">
<el-input v-model="form.password" placeholder="请输入账号" size="normal" clearable @change="">
</el-input>
</el-form-item>
<el-form-item label="" size="normal">
<a style="float: left;">注册</a>
</el-form-item>
<el-form-item label="" size="normal">
<el-button style="width: 250px;" type="primary" size="default" @click="">登录</el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
</body>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript" language="JavaScript">
new Vue({
el: '#app',
data: function () {
return {
visible: false,
form: {
username: '',
password: ''
}
}
}
})
</script>
</html>
效果
2. 纯HTML
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>登录</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333333;
background-color: rgb(245, 240, 240);
}
a {
cursor: pointer;
color: rgb(34, 144, 240);
}
.bind {
text-align: center;
}
.title {
margin: 30px 0px;
font-size: 20px;
width: inherit;
height: 35px;
}
.bind-form {
margin-top: 100px;
width: 300px;
background-color: #FFF;
border: 1px solid #DCDFE6;
padding: 20px;
display: inline-block;
}
.form-bobdy {
display: block;
}
.input-item {
width: 300px;
-webkit-appearance: none;
background-color: #FFF;
background-image: none;
border-radius: 4px;
border: 1px solid #DCDFE6;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: #606266;
display: inline-block;
font-size: inherit;
height: 40px;
line-height: 40px;
outline: 0;
padding: 0 15px;
}
.button {
width: 300px;
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background-color: #409EFF;
border: 1px solid #DCDFE6;
border-color: #409EFF;
color: #fff;
-webkit-appearance: none;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
margin: 0;
-webkit-transition: .1s;
transition: .1s;
font-weight: 500;
padding: 12px 20px;
font-size: 14px;
border-radius: 4px;
}
.form-item {
margin-bottom: 20px !important;
line-height: 40px;
position: relative;
}
</style>
</head>
<body>
<div id="app">
<div class="bind">
<div class="bind-form">
<div class="title">管理系统登录</div>
<form class="form-bobdy">
<div class="form-item">
<input class="input-item" type="text" name="username" placeholder="请输入账号">
</input>
</div>
<div class="form-item">
<input class="input-item" style="width: 300px;" name="password" placeholder="请输入密码" type="text">
</input>
</div>
<div class="form-item">
<a style="float: left;">注册</a>
</div>
<div class="form-item">
<input class="button" type="submit" value="登录"></input>
</div>
</form>
</div>
</div>
</div>
</body>
</html>
效果