HTML 网页设计 简约风格 注册界面

成品如下

html

html 复制代码
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Science科幻注册界面</title>
        <link href="css/comm.css" rel="stylesheet" type="text/css">
        <link href="css/register.css" rel="stylesheet" type="text/css"/>
        <style>
        body{
            background-image:url("image/www.png");
            background-size:cover;
        }
    </style>
</head>
<body>
<div class="register-box">
    <h2>注册</h2>
    <form>
        <div class="form-group">
            <label for="username" class="form-label">用户名</label>
            <input type="text" id="username" class="form-input">
        </div>
        <div class="form-group">
            <label for="email" class="form-label">邮箱</label>
            <input type="email" id="email" class="form-input">
        </div>
        <div class="form-group">
            <label for="password" class="form-label">密码</label>
            <input type="password" id="password" class="form-input">
        </div>
        <div class="form-group">
            <label for="confirm_password" class="form-label">确认密码</label>
            <input type="password" id="confirm_password" class="form-input">
        </div>
        <button type="submit" class="submit-btn"><a class="submit-btn" href="index.html">注册</a></button>
    </form>
</div>
</body>
</html>

css

html 复制代码
.register-box {
    width: 380px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 100px;
    margin-left: 500px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
}

.form-input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.submit-btn {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
h2 {
    position: relative;
    left: 150px;
}
.submit-btn:hover, .submit-btn:active {
	    color: red;
		text-decoration: none;
	}
.submit-btn:link, .submit-btn:visited {
	    text-decoration: none;
	}

背景图片

相关推荐
majingming1237 小时前
FUNCTION
java·前端·javascript
A_nanda8 小时前
Vue项目升级
前端·vue3·vue2
SuperEugene8 小时前
Axios 接口请求规范实战:请求参数 / 响应处理 / 异常兜底,避坑中后台 API 调用混乱|API 与异步请求规范篇
开发语言·前端·javascript·vue.js·前端框架·axios
abigale038 小时前
【浏览器 API / 网络请求 / 文件处理】前端文件上传全流程:从基础上传到断点续传
前端·typescript·文件上传·vue cli
Setsuna_F_Seiei9 小时前
AI 对话应用之页面滚动交互的实现
前端·javascript·ai编程
新缸中之脑9 小时前
追踪来自Agent的Web 流量
前端
wefly20179 小时前
从使用到原理,深度解析m3u8live.cn—— 基于 HLS.js 的 M3U8 在线播放器实现
java·开发语言·前端·javascript·ecmascript·php·m3u8
英俊潇洒美少年10 小时前
vue如何实现react useDeferredvalue和useTransition的效果
前端·vue.js·react.js
kyriewen1110 小时前
给浏览器画个圈:CSS contain 如何让页面从“卡成PPT”变“丝滑如德芙”
开发语言·前端·javascript·css·chrome·typescript·ecmascript
英俊潇洒美少年11 小时前
react19和vue3的优缺点 对比
前端·javascript·vue.js·react.js