用html写一个外卖登录界面
时间: 2023-09-23 17:13:07 浏览: 59
以下是一个简单的外卖系统登录界面的HTML代码:
```
<!DOCTYPE html>
<html>
<head>
<title>外卖系统登录</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
form {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
input[type=text], input[type=password] {
padding: 10px;
margin: 10px 0;
border: none;
border-radius: 3px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
button {
padding: 10px;
margin: 10px 0;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 3px;
cursor: pointer;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
button:hover {
background-color: #3e8e41;
}
a {
color: #4CAF50;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<form>
<h2>外卖系统登录</h2>
<label for="username">用户名:</label>
<input type="text" id="username" name="username" placeholder="请输入用户名" required>
<label for="password">密码:</label>
<input type="password" id="password" name="password" placeholder="请输入密码" required>
<button type="submit">登录</button>
<p>还没有账号?<a href="register.html">立即注册</a></p>
<p><a href="#">忘记密码?</a></p>
</form>
</body>
</html>
```
以上代码使用了HTML和CSS语言,实现了一个简单的外卖系统登录界面。其中包含一个表单、两个输入框、两个按钮和两个链接。用户可以通过输入用户名和密码来登录系统,也可以点击注册按钮跳转到注册页面。同时也提供了忘记密码的链接,方便用户找回密码。