写一个简单好看的登陆页面
时间: 2023-07-31 22:10:13 浏览: 44
以下是一个简单好看的登陆页面的示例代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
h1 {
text-align: center;
margin-top: 50px;
color: #333;
}
form {
width: 400px;
margin: 0 auto;
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
margin: 10px 0;
border: none;
border-radius: 3px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
}
input[type="submit"] {
background-color: #007bff;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 3px;
cursor: pointer;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
transition: background-color 0.3s ease-in-out;
}
input[type="submit"]:hover {
background-color: #0062cc;
}
</style>
</head>
<body>
<h1>Login Page</h1>
<form>
<input type="text" name="username" placeholder="Username">
<input type="password" name="password" placeholder="Password">
<input type="submit" value="Login">
</form>
</body>
</html>
```
这个页面使用了简单的 HTML 和 CSS 代码,设置了背景色、字体、表单样式等,使得页面看起来简洁美观。登录表单包含用户名、密码输入框和登录按钮,其中登录按钮设置了鼠标悬停时的背景色变化效果,增强了交互性。