海岛宾馆预订首页
/* 全局样式 */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background: linear-gradient(to bottom, #e0f7fa, #b2ebf2);
color: #00695c;
}
/* 导航栏样式 */
.navbar {
background-color: #00695c;
overflow: hidden;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
justify-content: space-between; /* 让导航栏内容两端对齐 */
padding: 0 20px; /* 增加左右内边距 */
}
/* logo样式 */
.navbar .logo {
height: 60px; /* 调整 logo 高度 */
width: auto;
max-width: 150px; /* 调整 logo 最大宽度 */
margin-right: 20px; /* 增加 logo 和导航栏链接之间的间距 */
}
.navbar a {
float: left;
display: block;
color: white;
text-align: center;
padding: 20px 25px; /* 调整导航栏链接的内边距 */
text-decoration: none;
font-size: 20px; /* 调整导航栏文字大小 */
transition: background-color 0.3s ease, transform 0.2s ease;
}
.navbar a:hover {
background-color: #004d40;
transform: scale(1.1);
}
/* 图片滑动容器样式 */
.image-slider {
width: 100%;
overflow: hidden;
position: relative;
margin: 30px 0;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.image-slider .slide-track {
display: flex;
transition: transform 0.5s ease;
}
.image-slider img {
min-width: 100%;
object-fit: cover;
height: 400px;
filter: brightness(0.8);
transition: filter 0.3s ease;
}
.image-slider img:hover {
filter: brightness(1);
}
.slider-btn {
position: absolute;
top: 50%;
transform: translateY(-50%);
background-color: rgba(0, 0, 0, 0.7);
color: white;
border: none;
padding: 15px;
font-size: 20px;
cursor: pointer;
z-index: 10;
transition: background-color 0.3s ease;
}
.slider-btn.prev {
left: 20px;
}
.slider-btn.next {
right: 20px;
}
.slider-btn:hover {
background-color: rgba(0, 0, 0, 0.9);
}
/* 查询栏目容器样式 */
.search-container {
background-color: rgba(255, 255, 255, 0.9);
padding: 30px;
margin: 30px;
border-radius: 15px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 30px;
}
.search-title {
font-size: 32px;
font-weight: bold;
width: 100%;
text-align: center;
margin-bottom: 30px;
color: #004d40;
}
/* 查询项样式 */
.search-item {
flex: 1 1 calc(16.666% - 30px);
min-width: 200px;
}
.search-item label {
display: block;
margin-bottom: 10px;
font-weight: 600;
color: #004d40;
}
.search-item input[type="date"],
.search-item select {
width: 100%;
padding: 15px;
border: none;
border-radius: 8px;
background-color: white;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: box-shadow 0.3s ease;
font-size: 16px;
}
.search-item input[type="date"]:focus,
.search-item select:focus {
outline: none;
box-shadow: 0 0 0 3px #00695c;
}
/* 语言切换按钮样式 */
.lang-switcher {
position: absolute;
top: 10px;
right: 10px;
z-index: 100;
}
.lang-switcher button {
background-color: #00695c;
color: white;
border: none;
padding: 8px 12px;
margin-left: 5px;
cursor: pointer;
border-radius: 5px;
transition: background-color 0.3s ease;
}
.lang-switcher button:hover {
background-color: #004d40;
}
/* 宣传栏目样式 */
.promotion-section {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 根据屏幕空间自适应布局,最小300px宽度 */
gap: 30px;
margin: 50px 30px;
padding: 30px;
background-color: #f0f4f8;
border-radius: 20px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.promotion-item {
position: relative;
overflow: hidden;
border-radius: 15px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
transition: transform 0.3s ease, filter 0.3s ease;
filter: brightness(0.9);
}
.promotion-item:hover {
transform: scale(1.05);
filter: brightness(1.1);
}
.promotion-item img {
width: 100%;
height: auto;
display: block;
}
.promotion-item .text {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
background-color: rgba(0, 105, 92, 0.9);
color: white;
padding: 20px;
border-radius: 0 0 15px 15px;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
text-align: left;
font-size: 16px;
/* 新增样式 */
max-height: 200px; /* 设置最大高度 */
overflow-y: auto; /* 超出部分可滚动 */
}
.promotion-item:hover .text {
opacity: 1;
visibility: visible;
}
.promotion-item .text h3 {
font-size: 20px;
margin-top: 0;
margin-bottom: 10px;
}