制作一个表单页面 - 简单易懂的步骤
<!DOCTYPE html>
<html>
<head>
<title>制作一个简单的表单页面</title>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
form {
background-color: #fff;
margin: 50px auto;
padding: 30px;
border-radius: 8px;
box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
max-width: 500px;
}
h1 {
text-align: center;
margin-bottom: 20px;
color: #333;
}
label {
display: block;
margin-bottom: 8px;
color: #666;
}
input[type=text], textarea {
width: 100%;
padding: 10px;
border: none;
border-radius: 4px;
background-color: #f2f2f2;
margin-bottom: 20px;
}
input[type=submit] {
background-color: #4CAF50;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<form>
<h1>简单的表单页面</h1>
<label for='name'>姓名:</label>
<input type='text' id='name' name='name' required>
<label for='email'>电子邮件:</label>
<input type='text' id='email' name='email' required>
<label for='message'>留言:</label>
<textarea id='message' name='message' rows='5' required></textarea>
<input type='submit' value='提交'>
</form>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/muZq 著作权归作者所有。请勿转载和采集!