.searchbar-container { display: flex; /* 使用 Flexbox 布局 */ align-items: center; /* 垂直居中 */ gap: 2px; /* 搜索框和按钮之间的间距 */ } .searchbar-container ion-searchbar { flex: 1; /* 搜索框占满剩余空间 */ } .searchbar-container ion-button { flex-shrink: 0; /* 按钮宽度保持固定 */ padding: 0 16px; /* 增加按钮的左右内边距 */ font-size: 16px; /* 调整按钮字体大小 */ } // 轮播图区域 .carousel-container { position: relative; max-width: 800px; margin: 0 auto; overflow: hidden; } .carousel { display: flex; transition: transform 0.5s ease-in-out; } .slide { min-width: 100%; } .slide img { width: 100%; height: auto; } .prev, .next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.5); color: white; padding: 16px; border: none; cursor: pointer; } .prev { left: 0; } .next { right: 0; } .dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); text-align: center; } .dot { display: inline-block; width: 10px; height: 10px; margin: 0 5px; background: #bbb; border-radius: 50%; cursor: pointer; } .dot.active { background: #717171; } // .inquery{ width:100%; height:100px; // --background-color: #fd0000; padding: 5px 0px; box-sizing: border-box; margin: 0px 0px; ion-button{ width: 100%; height: 100%; display: inline-block; } } .inquery-ai{ height: 100%; width: 48%; display: inline-block; margin: 0; padding: 0; } .inquery-ai img{ width:50%; height: 100%; margin: 0; padding: 0; border-radius: 10px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .inquery-human{ height: 100%; width: 48%; display: inline-block; margin-left: 2%; padding: 0; } .inquery-human img{ width:50%; height: 100%; margin: 0; padding: 0; border-radius: 10px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .mid-nav { display: flex; justify-content: space-between; margin-top: 5px; margin-bottom: 5px; margin-left: 15px; margin-right: 15px; } .under_slide { display: flex; align-items: center; text-align: right; font-size: smaller; } ion-item { margin-bottom: 12px; /* 增加医生卡片之间的间距 */ padding: 12px; /* 调整卡片内边距 */ border-radius: 8px; /* 圆角设计 */ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加卡片阴影 */ background-color: #ffffff; /* 卡片背景色 */ } ion-thumbnail { width: 60px; /* 缩略图宽度 */ height: 60px; /* 缩略图高度 */ border-radius: 50%; /* 圆形头像 */ } .doctor-info { margin-left: 12px; /* 缩略图与文字的间距 */ display: flex; flex-direction: column; justify-content: center; } .doctor-info h3 { margin: 0; font-size: 16px; font-weight: bold; } .doctor-info p { margin: 4px 0; font-size: 14px; color: #666; /* 字体颜色 */ } // 功能区 .function-area { margin: 16px 0; padding: 0 16px; background: white; border-radius: 10px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); width: 100%; max-width: 960px; /* 最大宽度 */ } .function-row { display: flex; // 使用 Flexbox 布局 justify-content: space-between; // 按空间均匀分布 align-items: center; // 垂直居中 overflow-x: auto; // 允许水平滚动 scroll-snap-type: x mandatory; // 启用滚动捕捉 -webkit-overflow-scrolling: touch; // 平滑滚动 padding: 16px 0; .function-item { flex: 1 0 20%; // 每个项目占 20% 宽度 min-width: 0; // 确保项目可以缩小 display: flex; flex-direction: column; align-items: center; text-align: center; scroll-snap-align: start; // 滚动时对齐 .icon { font-size: 24px; margin-bottom: 8px; } .label { font-size: 14px; color: #333; } } }