城市预约挂号平台静态网页
时间:2023-05-09 12:39:01 | 来源:网站运营
时间:2023-05-09 12:39:01 来源:网站运营
城市预约挂号平台静态网页:<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>医院平台预约</title>
//链接css
<link rel="stylesheet" href="./hospital.css" type="text/css">
<link rel="stylesheet" href="./hospitalBase.css" type="text/css">
<link rel="stylesheet" href="./ui.css" type="text/css">
</head>
<body>
<div class="body">
<div class="top" id="top">
<div class="wrap">
<p class="call">010-114/116114电话预约</p>
<p class="welcome">
欢迎来到城市预约挂号统一平台
<a href="#">登录</a>
<a href="#">注册</a>
<a href="#">帮助中心</a>
</p>
</div>
</div>
<div class="header" id="header">
<div class="wrap clearFix">
<a href="#" class="logo"><img src="./image/logo.png"></a>
<div class="search ui-search">
<div class="ui-search-selected" id="ui-search-selected">医院</div>
<div class="ui-search-selecte-list" id="ui-search-selecte-list">
<a href="#1" class="abc">科室</a>
<a href="#1" class="abc">疾病</a>
<a href="#1" class="abc">医院</a>
</div>
<input type="text" name="search-content" class="ui-search-input" placeholder="请输入搜索内容">
<a href="#" class="ui-search-submit"> </a>
</div>
</div>
</div>
<div class="nav" id="nav">
<div class="wrap">
<div class="link menu">全部科室
<div class="menu-list"></div>
</div>
<a href="#" class="link">按医院挂号</a>
<a href="#" class="link">按科室挂号</a><a href="#" class="link">按疾病挂号</a>
<a href="#" class="link">最新公告</a>
<a href="#" class="link right">社会知名医院</a>
</div>
</div>
<div class="banner" id="banner">
<div class="banner-slider"></div>
<div class="banner-search">
<div class="caption"><span class="text">快速预约</span></div>
<div class="form">
<div class="line"><select name="area"><option>医院地区</option></select>
</div>
<div class="line"><select name="area"><option>医院等级</option></select>
</div>
<div class="line"><select name="area"><option>医院名称</option></select>
</div>
<div class="line"><select name="area"><option>医院科室</option></select>
</div>
</div>
<div class="submit">
<input type="button" class="button" value="快速查询">
</div>
</div>
<div class="banner-help">
<div class="caption"><span class="text">帮助中心</span></div>
<div class="list">
<a href="#" class="link">账号指南</a>
<a href="#" class="link">预约指南</a>
<a href="#" class="link">账号找回</a>
<a href="#" class="link">常见问题</a>
</div>
</div>
</div>
<div class="content " id="content">
<div class="wrap clearFix">
<div class="content-tab">
<div class="caption">
<a href="#8" class="item">医院</a>
<a href="#8" class="item item_focus">科室</a>
</div>
<div class="block">
<div class="item">
<div class="block-caption">
<a href="#1" class="block-caption-item block-caption-item_focus">东城区</a>
<a href="#1" class="block-caption-item">西城区</a>
<a href="#1" class="block-caption-item">朝阳区</a>
<a href="#1" class="block-caption-item">丰台区</a>
<a href="#1" class="block-caption-item">石景山区</a>
<a href="#1" class="block-caption-item">门头沟区</a>
<a href="#1" class="block-caption-item">海淀区</a>
<a href="#1" class="block-caption-item">房山区</a>
<a href="#1" class="block-caption-item">其他</a>
</div>
<div class="block-content">
<div class="block-list clearFix">
<div class="item">
<img src="./image/hospital-1.jpg" alt="xx医院">
<div class="item-name">杭州协和医院<span class="item-level">【三级甲等】</span></div>
<div class="item-phone">电话:东院咨询电话:010-69155564</div>
<div class="item-adress">
杭州市东城区帅府一号。。。
</div>
</div>
<div class="item">
<img src="./image/hospital-1.jpg" alt="xx医院">
<div class="item-name">杭州协和医院<span class="item-level">【三级甲等】</span></div>
<div class="item-phone">电话:东院咨询电话:010-69155564</div>
<div class="item-adress">
杭州市东城区帅府一号。。。
</div>
</div>
<div class="item">
<img src="./image/hospital-1.jpg" alt="xx医院">
<div class="item-name">杭州协和医院<span class="item-level">【三级甲等】</span></div>
<div class="item-phone">电话:东院咨询电话:010-69155564</div>
<div class="item-adress">
杭州市东城区帅府一号。。。
</div>
</div>
<div class="item">
<img src="./image/hospital-1.jpg" alt="xx医院">
<div class="item-name">杭州协和医院<span class="item-level">【三级甲等】</span></div>
<div class="item-phone">电话:东院咨询电话:010-69155564</div>
<div class="item-address">
杭州市东城区帅府一号。。。
</div>
</div>
</div>
<div class="block-text-list clearFix">
<a href="#9" class="item">首都儿童医院<span class="level">【三级甲等】</span></a>
<a href="#9" class="item">首都儿童医院<span class="level">【三级甲等】</span></a>
<a href="#9" class="item">首都儿童医院<span class="level">【三级甲等】</span></a>
<a href="#9" class="item">首都儿童医院<span class="level">【三级甲等】</span></a>
<a href="#9" class="item">首都儿童医院<span class="level">【三级甲等】</span></a>
<a href="#9" class="item">首都儿童医院<span class="level">【三级甲等】</span></a>
</div>
<a class="block-more">更多医院</a>
</div>
</div>
<div class="item"></div>
</div>
</div>
<div class="content-news">
<div class="caption">最新公告 <a href="#8" class="more">更多</a></div>
<div class="list">
<a href="#9" class="link">阜外医院特需门诊暂停更新...</a>
<a href="#9" class="link">防护策略升级通知</a>
<a href="#9" class="link">阜外医院特需门诊暂停更新...</a>
<a href="#9" class="link">防护策略升级通知</a>
<a href="#9" class="link">阜外医院特需门诊暂停更新...</a>
<a href="#9" class="link">防护策略升级通知</a>
</div>
</div>
<div class="content-close">
<div class="caption">诊停公告 <a href="#8" class="more">更多</a></div>
<div class="list">
<a href="#9" class="link">首都医科大学附属杭州安贞医院消...</a>
<a href="#9" class="link">首都医科大学附属杭州安贞医院妇...</a>
<a href="#9" class="link">阜外医院特需门诊暂停更新...</a>
<a href="#9" class="link">防护策略升级通知</a>
<a href="#9" class="link">阜外医院特需门诊暂停更新...</a>
<a href="#9" class="link">防护策略升级通知</a>
</div>
</div>
</div>
</div>
<div class="footer" id="footer">
Copyright © xxx版权所有
</div>
</div>
//脚本语言
<script src="./hospital.js"></script>
</body>
</html>
//hospital.css* {
margin: 0;
padding: 0;
}
.clearFix:after {
content: " ";
display: block;
height: 0;
line-height: 0;
clear: both;
zoom: 1;
}
.wrap {
width: 1000px;
margin: 0 auto;
position: relative;
}
.top {
height: 30px;
background: #f5f5f5;
}
.header {
height: 92px;
}
.nav {
height: 36px;
background: #60bff2;
}
.banner {
width: 802px;
margin: 0 auto;
height: 414px;
padding: 9px 0 0 198px;
}
.banner-slider {
float: left;
width: 544px;
height: 414px;
background: #8edff3;
}
.banner-search {
float: right;
width: 250px;
height: 256px;
background: #eee;
}
.banner-help {
float: right;
width: 250px;
height: 146px;
background: #ccc;
margin-top: 12px;
}
.content {
padding: 10px 0 38px 0;
}
.content-tab {
float: left;
width: 742px;
height: 490px;
background: #eee;
}
.content-news,
.content-close {
float: right;
width: 248px;
height: 243px;
border: 1px solid #ccc;
}
.footer {
height: 70px;
padding: 25px 0;
background: #eceef2;
}
//hospialBase.cssp {
margin: 0;
padding: 0;
display: inline-block;
}
a {
text-decoration: none;
}
select,
input {
border: none;
outline: none;
}
.top {
line-height: 30px;
font-size: 13px;
color: #868686;
}
.top .call {
float: left;
padding-left: 20px;
background: url(./image/icon-call.png) no-repeat center left;
}
.top .welcome {
float: right;
}
.top a {
color: #2da5e1;
padding-left: 10px;
}
.header .logo {
width: 402px;
height: 74px;
padding: 9px 0;
display: inline-block;
}
.header .logo img {
width: 100%;
height: 100%;
}
.header .search {
width: 326px;
height: 38px;
position: absolute;
right: 0;
top: 29px;
/* background-color: orange; */
}
/*nav*/
.nav .link {
display: inline-block;
float: left;
padding-left: 30px;
line-height: 36px;
color: #fff;
font-size: 16px;
min-width: 80px;
text-align: center;
}
.nav a:hover {
color: #d7f3ff;
}
.nav .menu {
width: 130px;
padding-right: 30px;
background-color: #1fa4f0;
position: relative;
}
.nav .menu .menu-list {
background: #1fa4f0;
width: 100%;
height: 423px;
position: absolute;
left: 0;
top: 36px;
}
/*banner*/
.banner-search {
background: #fafafa;
}
.banner-search .caption,
.banner-help .caption {
display: inline-block;
height: 22px;
width: 100%;
padding: 15px 0 15px 0;
text-align: center;
}
.banner-search .caption .text,
.banner-help .caption .text {
display: inline-block;
height: 22px;
line-height: 22px;
padding-left: 28px;
color: #fec009;
font-size: 16px;
background: url(./image/icon-help.png) no-repeat;
}
.banner-search .form {
height: 150px;
}
.banner-search .form .line {
padding-bottom: 9px;
text-align: center;
}
.banner-search .form .line select {
width: 170px;
font-size: 12px;
z-index: 0;
border: 1px solid #dcdddd;
height: 26px;
line-height: 26px;
padding: 2px 0;
color: #666;
}
.banner-search .submit {
height: 32px;
text-align: center;
}
.banner-search .submit .button {
width: 108px;
height: 33px;
background: #fecd09;
font-size: 14px;
color: #fff;
border-radius: 3px;
}
.banner-help {
background: #fafafa;
}
.banner-help .caption .text {
color: #00b3ea;
background-position: 0 -23px;
}
.banner-help .link {
color: #00b3ea;
display: inline-block;
width: 86px;
height: 26px;
line-height: 26px;
font-size: 14px;
text-align: center;
padding: 0 0 8px 26px;
}
/*content*/
.content-news {
background: #fff;
border: 1px solid #f3f6fa;
}
.content-news .caption,
.content-close .caption {
height: 38px;
line-height: 38px;
background: #f4f6fa;
text-indent: 20px;
/*首行缩进*/
color: #fec009;
font-size: 15px;
}
.content-news .more,
.content-close .more {
float: right;
padding-right: 22px;
font-size: 12px;
color: #868686;
}
.content-news .list,
.content-close .list {
padding: 15px 20px 13px 35px;
line-height: 29px;
font-size: 12px;
background: url(./image/list-yellow.jpg) 17px 20px no-repeat;
}
.content-news .list .link,
.content-close .list .link {
display: block;
color: #969696;
}
.content-close {
background: #fff;
border: 1px solid #f4f6fa;
}
.content-close .caption {
color: #4ad4ed;
}
.content-close .list {
background-image: url(./image/list-blue.jpg);
}
.content-tab {
background: none;
}
.content-tab .caption {
height: 34px;
line-height: 34px;
background: #f5f6fa;
}
.content-tab .caption .item {
display: block;
width: 112px;
height: 34px;
text-align: center;
float: left;
color: #00b3ea;
}
.content-tab .caption .item_focus {
background: #60bff2;
color: #fff;
}
.content-tab .block {
border: 1px solid #f4f6fa;
height: 452px;
}
.content-tab .block-caption {
height: 26px;
padding: 8px;
line-height: 26px;
border-bottom: 1px solid #f4f6fa;
}
.content-tab .block-caption-item {
display: block;
padding: 0 10px 0 10px;
font-size: 12px;
color: #4c4948;
float: left;
}
.content-tab .block-caption-item_focus {
background: #60bff2;
color: #fff;
}
.content-tab .block-cpmtent {
padding: 16px 12px;
}
.content-tab .block-content .block-more {
display: block;
line-height: 55px;
text-align: center;
color: #5084c4;
font-size: 14px;
}
/*医院列表容器*/
.content-tab .block-content .block-list {}
.content-tab .block-content .block-list .item {
float: left;
width: 216px;
height: 102px;
padding: 0 10px 20px 120px;
position: relative;
font-size: 12px;
}
.content-tab .block-content .block-list .item img {
width: 110px;
height: 98px;
position: absolute;
top: 0;
left: 0;
}
.content-tab .block-content .block-list .item-name {
color: #036eb7;
font-size: 14px;
line-height: 21px;
padding-top: 13px;
}
.content-tab .block-content .block-list .item-level {
float: right;
font-size: 12px;
color: #979797;
}
.content-tab .block-content .block-list .item-phone,
.content-tab .block-content .block-list .item-address {
line-height: 18px;
padding-bottom: 4px;
color: #666;
}
/*文案*/
.content-tab .block-content .block-text-list .item {
display: block;
width: 351px;
height: 27px;
font-size: 14px;
color: #666;
padding-top: 8px;
float: left;
border-bottom: 1px dashed #dcdddd;
}
.content-tab .block-content .block-text-list .item:nth-child(2n) {
margin-left: 13px;
}
.footer {
line-height: 70px;
text-align: center;
font-size: 12px;
color: #666;
}
//ui.css.ui-search {
background: url(./image/ui-search.jpg) center no-repeat;
font-size: 14px;
color: #fff;
position: relative;
}
.ui-search-selected {
width: 70px;
height: 38px;
line-height: 38px;
position: absolute;
left: 0;
top: 0;
text-indent: 14px;
}
.ui-search-selecte-list {
display: none;
position: absolute;
width: 67px;
line-height: 24px;
background: #fff;
box-shadow: 3px 3px 5px rgba(0, 0, 0, .2);
/*加上阴影*/
left: 2px;
top: 36px;
z-index: 2;
}
.ui-search-selecte-list a {
display: block;
color: #a5a2a2;
text-align: center;
}
.ui-search-selecte-list a:hover {
background: #ebeef5;
}
.ui-search-input {
width: 208px;
height: 26px;
position: absolute;
top: 5px;
left: 71px;
line-height: 26px;
font-size: 13px;
color: #a5a2a2;
}
.ui-search-submit {
display: block;
position: absolute;
right: 0;
top: 1px;
width: 40px;
height: 36px;
}
//hospital.jsvar uiSearch = document.getElementById('ui-search');
var uiSearchSelscted = document.getElementById('ui-search-selected');
var uiSearchSelecteList = document.getElementById('ui-search-selecte-list');
var a = uiSearchSelecteList.getElementsByTagName('a');
var list = true;
/* uiSearchSelscted.onclick = function() {
} */
document.addEventListener("click", function() {
uiSearchSelecteList.style.display = 'none';
list = !list; //引入list布尔值实现div点击显示与隐藏无bug
// console.log(1)
})
uiSearchSelscted.addEventListener("click", function(event) {
event = event || widow.event;
event.stopPropagation();
if (list) {
uiSearchSelecteList.style.display = 'block';
list = !list;
} else {
uiSearchSelecteList.style.display = 'none';
list = !list;
}
// console.log(2)//测试是否实现
})
for (let b of a) {
b.onclick = function() {
uiSearchSelscted.innerText = this.innerText;
uiSearchSelecteList.style.display = 'none';
}
} //for...of实现a标签传递值需要获取a标签即getElementsByTagName('a').