【HTML+CSS+JS】模仿QQ登录界面
warning:
这篇文章距离上次修改已过189天,其中的内容可能已经有所变动。
以下是一个简单的HTML和CSS代码示例,用于模拟QQ登录界面的基本结构和样式。JavaScript代码将在后续提供,以便实现更复杂的功能,如表单验证。
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>QQ登录界面模拟</title>
<style>
body {
background-color: #4facfe;
font-family: 'Microsoft YaHei', Arial, sans-serif;
}
.login-container {
width: 300px;
margin: 100px auto;
padding: 20px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.login-title {
text-align: center;
padding: 10px 0;
font-size: 18px;
}
.login-input {
margin: 10px 0;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
width: calc(100% - 20px);
}
.login-button {
width: 100%;
padding: 10px;
background-color: #3888fa;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
.login-button:hover {
background-color: #3377cc;
}
.login-link {
text-align: center;
font-size: 12px;
margin-top: 20px;
}
</style>
</head>
<body>
<div class="login-container">
<div class="login-title">QQ登录</div>
<input type="text" class="login-input" placeholder="用户名/手机/邮箱">
<input type="password" class="login-input" placeholder="密码">
<button class="login-button">登录</button>
<div class="login-link">忘记密码?点击这里</div>
</div>
<!-- JavaScript代码将在这里添加 -->
</body>
</html>
以上代码提供了一个简单的QQ登录界面模拟,包括基本的布局、样式和输入字段。对于更复杂的功能,比如表单验证和登录逻辑,您可以使用JavaScript来扩展这个简单的示例。
评论已关闭