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;
	}

背景图片

相关推荐
xyphf_和派孔明16 分钟前
企业级微前端项目完整创建步骤,第三步:配置 Vue 子应用
前端·javascript
自强的小白17 分钟前
条件查询或查询全部时时前端请求数据等时间格式
前端
阳光是sunny35 分钟前
LangGraph实战教程:一文搞懂图的状态(State)管理
前端·人工智能·后端
whyfail1 小时前
前端学 Spring Boot(5):从“你是谁”到“服务真的上线了”
前端·spring boot·后端
程序员黑豆1 小时前
鸿蒙开发:RelativeContainer相对布局组件实战——实现5个文本组件对齐
前端·华为·harmonyos
环境栈笔记2 小时前
高性价比指纹浏览器推荐与选型:如何对照价格和实际可用功能筛选候选
前端·人工智能·后端·自动化
hyf3266332 小时前
泛程序哪有想象中难!小白跟着走一遍就全懂
前端·爬虫·搜索引擎·seo·蜘蛛池
码农学院2 小时前
React公众号开发:母婴用品会员积分体系技术方案
前端·react.js·前端框架
路光.2 小时前
Vue2升级Vue3处理原 UMD/CommonJS 打包文件,不是标准 ESM
前端·javascript·vue.js·vue3
黄华SJ520it2 小时前
门店预约系统开发:提升服务行业数字化转型
前端·数据库·系统开发