请模仿淘宝实现一个登录页面
时间: 2024-03-10 07:44:02 浏览: 17
好的,以下是一个简单的淘宝登录页面的HTML和CSS代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>淘宝登录</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="login-box">
<h1>淘宝登录</h1>
<form>
<label for="username">用户名</label>
<input type="text" id="username" name="username" placeholder="请输入用户名">
<label for="password">密码</label>
<input type="password" id="password" name="password" placeholder="请输入密码">
<input type="submit" value="登录">
</form>
</div>
</body>
</html>
```
```css
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
.login-box {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.2);
max-width: 400px;
margin: 50px auto;
padding: 20px;
text-align: center;
}
h1 {
color: #ff4400;
font-size: 32px;
margin-bottom: 20px;
}
form {
display: inline-block;
text-align: left;
}
label {
display: block;
margin-bottom: 5px;
}
input[type="text"],
input[type="password"] {
border: 1px solid #ccc;
border-radius: 5px;
font-size: 16px;
margin-bottom: 20px;
padding: 10px;
width: 100%;
}
input[type="submit"] {
background-color: #ff4400;
border: none;
border-radius: 5px;
color: #fff;
cursor: pointer;
font-size: 16px;
padding: 10px;
width: 100%;
}
input[type="submit"]:hover {
background-color: #d63300;
}
```
注意:这只是一个简单的模仿,淘宝的实际登录页面可能更加复杂,并且还包括了一些安全验证措施。