使用html帮我写一个漂亮登陆注册
时间: 2023-09-04 19:11:54 浏览: 45
好的,以下是一个简单的登陆注册页面的HTML代码,你可以自己根据需要进行修改和美化。
```
<!DOCTYPE html>
<html>
<head>
<title>Login/Register</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #f1f1f1;
}
* {
box-sizing: border-box;
}
/* Add padding to containers */
.container {
padding: 16px;
background-color: white;
}
/* Full-width input fields */
input[type=text], input[type=password] {
width: 100%;
padding: 15px;
margin: 5px 0 22px 0;
display: inline-block;
border: none;
background: #f1f1f1;
}
input[type=text]:focus, input[type=password]:focus {
background-color: #ddd;
outline: none;
}
/* Set a style for the submit button */
.btn {
background-color: #4CAF50;
color: white;
padding: 16px 20px;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
.btn:hover {
opacity: 1;
}
/* Add a blue text color to links */
a {
color: dodgerblue;
}
/* Set a grey background color and center the text of the "sign in" section */
.signin {
background-color: #f1f1f1;
text-align: center;
}
/* Responsive layout - when the screen is less than 600px wide, make the two columns stack on top of each other */
@media screen and (max-width: 600px) {
.col {
width: 100%;
margin-top: 0;
}
}
</style>
</head>
<body>
<h2>Login/Register Form</h2>
<div class="row">
<div class="col">
<div class="container">
<h3>Login</h3>
<p>Please fill in this form to login.</p>
<hr>
<label for="email"><b>Email</b></label>
<input type="text" placeholder="Enter Email" name="email" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
<button type="submit" class="btn">Login</button>
</div>
</div>
<div class="col">
<div class="container">
<h3>Register</h3>
<p>Please fill in this form to create an account.</p>
<hr>
<label for="email"><b>Email</b></label>
<input type="text" placeholder="Enter Email" name="email" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
<label for="psw-repeat"><b>Repeat Password</b></label>
<input type="password" placeholder="Repeat Password" name="psw-repeat" required>
<button type="submit" class="btn">Register</button>
</div>
</div>
</div>
</body>
</html>
```