<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<!-- 生产环境版本,优化了尺寸和速度 -->
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<style>
body{
margin: 0;
width: 100%;
height: 100%;
background: cadetblue;
}
#login{
margin: auto;
width: 600px;
height: 400px;
position: relative;
top: 100px;
background: burlywood;
}
#login h1{
text-align: center;
}
#login input{
width: 300px;
height: 20px;
}
#login button{
position: relative;
left:200px
}
.form-control{
margin: 20px;
}
</style>
</head>
<body>
<div id="login">
<h1>欢迎来到登录界面</h1>
<form method="post">
用户名:<input class="form-control" required="required" type="text"></br>
密 码:<input class="form-control" required="required" type="password"></br>
<button class="but" type="submit">登录</button>
<button class="but" >注册</button>
</form>
</div>
</body>
</html>
运行结果
简简单单使用继续加油