帮我写一个不需要外部引用的好看的html登录页面
时间: 2023-08-05 08:05:33 浏览: 28
好的,以下是一个简单的登录页面的 HTML 代码,不需要任何外部引用:
```
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
<style type="text/css">
body {
background-color: #F2F2F2;
font-family: Arial, sans-serif;
}
form {
background-color: #FFFFFF;
border-radius: 5px;
padding: 20px;
margin: 50px auto;
max-width: 400px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
border-radius: 5px;
border: none;
margin-bottom: 20px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
}
input[type="submit"] {
background-color: #4CAF50;
color: #FFFFFF;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
input[type="submit"]:hover {
background-color: #3E8E41;
}
</style>
</head>
<body>
<form>
<h2>Login</h2>
<label for="username">Username</label>
<input type="text" id="username" name="username" required>
<label for="password">Password</label>
<input type="password" id="password" name="password" required>
<input type="submit" value="Login">
</form>
</body>
</html>
```
这个页面的样式非常简单,但是看起来非常干净和现代化。它包括一个表单,用于输入用户名和密码,并有一个提交按钮。你可以根据自己的需要进行修改。