html+CSS的QQ注册界面练习

html

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>QQ注册</title>
	<link rel="stylesheet" type="text/css" href="./css/register.css">
</head>
<body>
	<div id="left_div">
		<img src="./image/QQregister.png">
	</div>
	<div id="right_div">
		<div id="right_center">
			<div id="text1">欢迎注册QQ</div>
			<div id="text2">
				<div id="text_div1">每一天乐在沟通</div>
				<div id="text_div2">免费靓号</div>
			</div>
			<div class="input_div">
				<input class="input" type="text" placeholder="昵称" name="username" id="username">
			</div>
			<div class="input_div">
				<input class="input" type="password" placeholder="密码" name="password" id="password">
			</div>

			<div id="phone_div">
				<input type="text" name="areaCode"
				id="areaCode"
				value="+86">
				<input type="text" name="phoneNum" id="phoneNum" placeholder="手机号码">
			</div>
			<div id="info">可通过该手机号找回密码
			</div>
            <div id="code_div">
                <input type="text" name="verCode" id="verCode" placeholder="验证码">
				<input type="submit" name="codeSubmit" id="codeSubmit" value="发送验证码">
			</div>
			<div>
				<input type="submit" name="submit" id="submit" value="立即注册">
			</div>
		</div>
	</div>

</body>
</html>

CSS

body{
	padding: 0;
	margin: 0;
	overflow-x: hidden;
	background:url("../image/bj888.png");
}

/* 划分左边区域 */

#left_div{
	position: fixed;
	width: 480px;
	height: 100%;
}
#left_div img{
	width: 480px;
	height: 100%;
}

/* 划分右边区域 */

#right_div{
	margin-left: 480px;
}
#right_center{
	width: 100%;
	padding-top: 120px;
	padding-left: 480px;
}
#right_center input{
	padding-left: 10px;
}

/* 设置文本样式 */
 
#text1{
	font-size: 44px;
	margin-bottom: 30px;
}

#text2 div{
	font-size: 28px;
	display: inline-block;
}

#text_div2{
	color: #359eff;
	margin-left:200px;
	margin-bottom: 30px;
	cursor: pointer;	
}

/* 设置输入样式 */

input{
	border: 1px #aaa solid;
	border-radius: 4px;
	font-size: 20px;
	height: 50px;	
}
.input{
	width: 500px;
}
.input_div{
	margin-top: 30px;
}

/* 设置区域、手机号样式 */
#areaCode{
	width: 120px;
}
#phone_div{
	margin-top: 30px;
}
#phoneNum{
	margin-left: 10px;
	width: 354px;
}
#info{
	font-size: 14px;
	height: 14px;
	color: #999;
	margin-top: 7px;
}

/* 设置验证码、发送验证码样式 */
#verCode{
	width: 120px;
}
#code_div{
	margin-top: 30px;
}
#codeSubmit{
    border: 1px #3083ff solid;
	background-color:#3487ff;
	color: #fff;
	margin-left: 10px;
	width: 364px;
}

#submit{
	width: 510px;
	border: 1px #3083ff solid;
	background-color:#3487ff;
	color: #fff;
	margin-top: 40px;
}


界面展示

在这里插入图片描述

  • 9
    点赞
  • 37
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
HTMLCSS和JSP是常用于构建网页和实现用户交互的前端技术。下面是一个简单的HTML+CSS+JSP登录注册页面的示例: HTML部分: ```html <!DOCTYPE html> <html> <head> <title>登录注册页面</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="container"> <h1>登录</h1> <form action="login.jsp" method="POST"> <label for="username">用户名:</label> <input type="text" id="username" name="username" required><br> <label for="password">密码:</label> <input type="password" id="password" name="password" required><br> <input type="submit" value="登录"> </form> <h1>注册</h1> <form action="register.jsp" method="POST"> <label for="newUsername">用户名:</label> <input type="text" id="newUsername" name="newUsername" required><br> <label for="newPassword">密码:</label> <input type="password" id="newPassword" name="newPassword" required><br> <input type="submit" value="注册"> </form> </div> </body> </html> ``` CSS部分(style.css): ```css .container { width: 300px; margin: 0 auto; padding: 20px; border: 1px solid #ccc; } h1 { text-align: center; } label { display: block; margin-bottom: 10px; } input[type="text"], input[type="password"] { width: 100%; padding: 5px; margin-bottom: 10px; } input[type="submit"] { width: 100%; padding: 10px; background-color: #4CAF50; color: white; border: none; cursor: pointer; } ``` JSP部分(login.jsp和register.jsp): ```jsp <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <title>登录注册页面</title> </head> <body> <%--%> <% if (request.getParameter("username") != null && request.getParameter("password") != null) { %> <% String username = request.getParameter("username"); %> <% String password = request.getParameter("password"); %> <%-- 在这里进行登录验证的逻辑处理 --%> <%-- 如果验证通过,可以进行页面跳转或其他操作 --%> <h2>登录成功!</h2> <% } %> <%-- 注册处理 --%> <% if (request.getParameter("newUsername") != null && request.getParameter("newPassword") != null) { %> <% String newUsername = request.getParameter("newUsername"); %> <% String newPassword = request.getParameter("newPassword"); %> <%-- 在这里进行注册逻辑处理 --%> <%-- 如果注册成功,可以进行页面跳转或其他操作 --%> <h2>注册成功!</h2> <% } %> </body> </html> ``` 以上是一个简单的HTML+CSS+JSP登录注册页面的示例,你可以根据自己的需求进行修改和扩展。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Lion King

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值