HTML 表单设计:半透明美观表单创建教程
<!DOCTYPE html>
<html>
<head>
<title>美观半透明表单</title>
<style>
form {
background-color: rgba(255, 255, 255, 0.8);
border: 1px solid black;
padding: 20px;
border-radius: 10px;
width: 500px;
margin: auto;
margin-top: 50px;
}
<pre><code> label {
display: inline-block;
width: 100px;
margin-bottom: 10px;
}
input[type='text'], input[type='password'], select {
width: 200px;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
border: none;
}
input[type='submit'] {
background-color: #4CAF50;
color: white;
border-radius: 5px;
border: none;
padding: 10px;
cursor: pointer;
}
textarea {
width: 400px;
height: 200px;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
border: none;
}
</style>
</code></pre>
</head>
<body>
<form>
<label for='name'>姓名:</label>
<input type='text' id='name' name='name' required>
<pre><code> <label for='gender'>性别:</label>
<select id='gender' name='gender'>
<option value='male'>男</option>
<option value='female'>女</option>
</select>
<label for='password'>密码:</label>
<input type='password' id='password' name='password' required>
<label for='education'>学历:</label>
<select id='education' name='education'>
<option value='college'>大专</option>
<option value='undergraduate'>本科</option>
</select>
<label for='resume'>简历:</label>
<textarea id='resume' name='resume' required></textarea>
<input type='submit' value='提交'>
</form>
</code></pre>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/muSQ 著作权归作者所有。请勿转载和采集!