图书购买信息

107 阅读1分钟
<!DOCTYPE html>
<html>
<head>
	<title>图书购买页面</title>
	<style>
		body {/* -9:样式定义,背景,字体,标题 */
			font-family: Arial, sans-serif;
			background-color: #f2f2f2;
		}
		h1 {/* -29:定义一个表单填写信息 */
			text-align: center;
			color: #555;
			margin-top: 30px;
		}/* -28:表单元素 */
		form {/* -20:定义边框 */
			max-width: 500px;
			margin: 0 auto;
			background-color: #fff;
			padding: 20px;
			border-radius: 5px;
			box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
		}
		label {/* -26:提交按钮 */
			display: block;
			margin-bottom: 10px;
			font-weight: bold;
			color: #555;
		}
		input[type="text"], input[type="email"], select {
			width: 100%;
			padding: 10px;
			border-radius: 5px;
			border: 1px solid #ccc;
			font-size: 16px;
			margin-bottom: 20px;
		}
		textarea {
			width: 100%;
			padding: 10px;
			border-radius: 5px;
			border: 1px solid #ccc;
			font-size: 16px;
			margin-bottom: 20px;
			resize: vertical;
		}
		input[type="submit"] {
			background-color: #4CAF50;
			color: #fff;
			border: none;
			padding: 10px 20px;
			border-radius: 5px;
			font-size: 16px;
			cursor: pointer;
		}
		input[type="submit"]:hover {
			background-color: #3e8e41;
		}
	</style>
</head>
<body>
	<h1>图书购买页面</h1>
	<form action="submit.php" method="post">
		<label for="name">姓名:</label>
		<input type="text" id="name" name="name" required>
		<label for="email">邮箱:</label>
		<input type="email" id="email" name="email" required>
		<label for="book">图书:</label>
		<select id="book" name="book" required>
			<option value="">请选择图书</option>
			<option value="book1">图书1</option>
			<option value="book2">图书2</option>
			<option value="book3">图书3</option>
		</select>
		<label for="message">留言:</label>
		<textarea id="message" name="message" rows="5"></textarea>
		<input type="submit" value="提交">
	</form>
</body>
</html>