开发记录 14
编写查找老人信息的html界面:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>老人信息查找系统</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: '微软雅黑', 'Helvetica Neue', sans-serif;
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
min-height: 100vh;
padding: 2rem;
}
.form-container {
max-width: 800px;
margin: 2rem auto;
padding: 2.5rem;
background: rgba(255,255,255,0.95);
border-radius: 20px;
box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}
h2 {
text-align: center;
color: #2c3e50;
font-size: 2.2rem;
margin-bottom: 2rem;
position: relative;
padding-bottom: 1rem;
}
h2::after {
content: '';
display: block;
width: 60px;
height: 3px;
background: #3498db;
margin: 0.5rem auto;
border-radius: 2px;
}
.form-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
}
.form-group {
position: relative;
margin-bottom: 1.2rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
color: #4a5568;
font-weight: 500;
font-size: 0.95rem;
}
.form-group input {
width: 100%;
padding: 0.8rem 1rem;
border: 2px solid #e2e8f0;
border-radius: 8px;
font-size: 1rem;
transition: all 0.3s ease;
background: #f8fafc;
}
.form-group input:focus {
outline: none;
border-color: #3498db;
background: white;
box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}
.form-group input::placeholder {
color: #a0aec0;
}
.button-group {
grid-column: 1 / -1;
text-align: center;
margin-top: 2rem;
}
#find_btn {
background: linear-gradient(145deg, #3498db, #2980b9);
color: white;
padding: 1rem 2.5rem;
border: none;
border-radius: 10px;
font-size: 1.1rem;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 6px rgba(52,152,219,0.1);
}
#find_btn:hover {
transform: translateY(-2px);
box-shadow: 0 7px 14px rgba(52,152,219,0.2);
}
#find_btn:active {
transform: translateY(1px);
}
@media (max-width: 768px) {
.form-grid {
grid-template-columns: 1fr;
}
.form-container {
margin: 1rem;
padding: 1.5rem;
}
h2 {
font-size: 1.8rem;
}
}
/* 输入图标装饰 */
.form-group::before {
content: "▶";
position: absolute;
left: -1.2rem;
top: 50%;
transform: translateY(-50%);
color: #3498db;
opacity: 0.6;
font-size: 0.8rem;
}
</style>
<!-- 引入字体图标 -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body>
<div class="form-container">
<h2>查询老人信息</h2>
<form id="search-form1" action="/2018/OlderFindbynameServlet" method="post">
<div class="form-group">
<label for="name"><i class="fas fa-text-name"></i> 姓名</label>
<input type="text" id="name" name="name" placeholder="请输入要查找者姓名">
</div>
<div class="button-group">
<input type="submit" id="find_btn" value="查找健康档案">
</div>
<br class="clear">
</form>
</div>
</body>
</html>

浙公网安备 33010602011771号