注册登录页面完成效果图html

   2025-07-28 00
核心提示:HTML简介:注册登录页面是一个网站的基础功能页面,其效果图通过HTML语言实现页面结构和布局。该页面包含注册和登录两个表单,用户可输入账号、密码等信息完成注册或登录操作。HTML用于构建页面元素,如表单、按钮、输入框等。

html

<title>注册登录页面</title>

<style>

body {

font-family: Arial, sans-serif;

background-color: #f4f4f4;

}

.container {

max-width: 400px;

margin: 0 auto;

padding: 20px;

background-color: #fff;

border-radius: 5px;

box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

}

注册登录页面完成效果图html

h2 {

text-align: center;

}

.form-group {

margin-bottom: 20px;

}

label {

display: block;

margin-bottom: 5px;

}

input[type="text"], input[type="password"] {

width: 100%;

padding: 10px;

border-radius: 3px;

border: 1px solid #ccc;

}

注册登录页面完成效果图html

input[type="submit"] {

width: 100%;

padding: 10px;

background-color: #4CAF50;

color: white;

border: none;

border-radius: 3px;

cursor: pointer;

}

</style>

<div class="container">

<h2>注册登录</h2>

<form id="loginForm" action="/login" method="post"> <!-- 登录表单 -->

<div class="form-group">

<label for="username">用户名:</label> <!-- 可以添加占位符属性 --> <!-- <input type="text" id="username" placeholder="用户名"> --> <!-- 添加输入框 --> <!-- <input type="password" id="password" placeholder="密码"> --> <!-- 密码输入框 --> <!-- <input type="submit" value="登录"> --> <!-- 登录按钮 --> <!-- </form> --> <!-- 登录表单结束 --> <!-- 注册表单部分可以类似添加 --> <!-- </div> --> <!-- 结束容器 --> <!-- 添加注册按钮 --> <!-- <button onclick="toggleForm()">注册</button> --> <!-- 注册按钮点击事件可以切换显示注册表单或登录表单 --> <!-- 添加注册表单 --> <!-- <form id="registerForm" style="display:none;"> --> <!-- 注册表单样式设置为隐藏状态,通过JS切换显示状态 --> <!-- 注册表单内容同上,只是提交地址和表单名称不同 --> <!-- </form> --> <!-- 注册表单结束 --> </div> <!-- 结束容器 --> </body> <!-- 结束HTML主体部分 --> </html> <!-- 结束HTML文档 -->```html<!DOCTYPE html>n<html>n<head>n <title>注册登录页面</title>n <style>n n body {n font-family: Arial, sans-serif;n background-color: #f4f4f4;n }nntttttttttttttttttntt<!-- CSS样式可以根据需要进行自定义 -->ntt.container {ntt max-width: 400px;ntt margin: 0 auto;ntt padding: 20px;ntt background-color: #fff;ntt border-radius: 5px;ntt box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);nt}nntt<!-- 表头居中显示 -->ntth2 {ntt text-align: center;n}nnt<!-- 每个表单组之间有一定的间距 -->nt.form-group {nt margin-bottom: 20px;n}nn<!-- 标签居中显示并距离下方文本有一定间距 -->nlabel {n display: block;n margin-bottom:

 
举报评论 0
 
更多>同类资讯
推荐图文
推荐资讯
点击排行
友情链接
网站首页  |  关于我们  |  联系方式  |  用户协议  |  隐私政策  |  版权声明  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报