<!DOCTYPE html>
<html>
<head>
	<title>注册表单</title>
	<meta charset="utf-8">
	<style type="text/css">
		form {
			margin: 0 auto;
			width: 400px;
			padding: 20px;
			background-color: #f2f2f2;
			border-radius: 5px;
			box-shadow: 0 0 5px #999;
		}
<pre><code>	label {
		display: inline-block;
		margin-bottom: 10px;
		font-weight: bold;
	}

	input[type=&quot;text&quot;], select, textarea {
		padding: 5px;
		border-radius: 3px;
		border: 1px solid #ccc;
		width: 100%;
		margin-bottom: 20px;
		box-sizing: border-box;
	}

	input[type=&quot;radio&quot;] {
		margin-right: 10px;
	}

	input[type=&quot;submit&quot;] {
		background-color: #4CAF50;
		color: #fff;
		padding: 10px 20px;
		border: none;
		border-radius: 3px;
		cursor: pointer;
		font-size: 16px;
		margin-top: 20px;
	}

	input[type=&quot;submit&quot;]:hover {
		background-color: #3e8e41;
	}
&lt;/style&gt;
</code></pre>
</head>
<body>
	<form>
		<label>姓名:</label><br>
		<input type="text" name="name" required><br>
<pre><code>	&lt;label&gt;性别:&lt;/label&gt;&lt;br&gt;
	&lt;input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;male&quot; checked&gt;男
	&lt;input type=&quot;radio&quot; name=&quot;gender&quot; value=&quot;female&quot;&gt;女&lt;br&gt;

	&lt;label&gt;喜好:&lt;/label&gt;&lt;br&gt;
	&lt;input type=&quot;checkbox&quot; name=&quot;hobby&quot; value=&quot;reading&quot;&gt;阅读
	&lt;input type=&quot;checkbox&quot; name=&quot;hobby&quot; value=&quot;music&quot;&gt;音乐
	&lt;input type=&quot;checkbox&quot; name=&quot;hobby&quot; value=&quot;sports&quot;&gt;运动
	&lt;input type=&quot;checkbox&quot; name=&quot;hobby&quot; value=&quot;travel&quot;&gt;旅行&lt;br&gt;

	&lt;label&gt;学历:&lt;/label&gt;&lt;br&gt;
	&lt;select name=&quot;education&quot;&gt;
		&lt;option value=&quot;college&quot;&gt;大专&lt;/option&gt;
		&lt;option value=&quot;undergraduate&quot;&gt;本科&lt;/option&gt;
	&lt;/select&gt;&lt;br&gt;

	&lt;label&gt;简介:&lt;/label&gt;&lt;br&gt;
	&lt;textarea name=&quot;introduction&quot; rows=&quot;6&quot;&gt;&lt;/textarea&gt;&lt;br&gt;

	&lt;input type=&quot;submit&quot; value=&quot;注册&quot;&gt;
&lt;/form&gt;
</code></pre>
</body>
</html>
写一个美观的html注册表单要有姓名性别男女可选喜好有4个可选学历大专和本科可选简介详细一点。

原文地址: https://www.cveoy.top/t/topic/66v 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录