/* 全局样式 */ ion-app { background: url('/assets/images/background-image1.jpg') no-repeat center center fixed; /* 添加背景图片 */ background-size: cover; /* 背景图片覆盖整个内容区域 */ background-position: center; /* 背景图片居中 */ height: 100vh; /* 确保背景覆盖整个视口高度 */ margin: 0; /* 移除默认的外边距 */ padding: 0; /* 移除默认的内边距 */ } ion-content { --background: transparent; /* 设置为透明,以便背景从 ion-app 继承 */ padding: 16px; } :host { --page-padding: 16px; --primary-color: #003366; /* 深蓝色 */ --secondary-color: #336633; /* 墨绿色 */ --background-color: #f5f5f5; --text-color: #333333; --highlight-color: #ffcc00; /* 高亮颜色 */ } .floating-button { --background: transparent !important; --color: inherit !important; /* 增大按钮尺寸 */ width: 64px; /* 根据需要调整 */ height: 64px; /* 根据需要调整 */ font-size: 24px; /* 如果有文字内容,可以调整字体大小 */ position: relative; /* 添加相对定位以便伪元素定位 */ cursor: pointer; /* 添加鼠标悬停效果 */ img { width: 100%; /* 确保图片占满按钮 */ height: 100%; /* 确保图片占满按钮 */ object-fit: contain; /* 确保图片不失真 */ } &:hover::after { opacity: 1 !important; /* 使用 !important 来测试 */ } } /* 其他样式保持不变 */ .gradient-background { background: linear-gradient(135deg, #ff7e5f, #feb47b); /* 你可以根据需要调整渐变色 */ color: white; /* 确保文字颜色与背景对比明显 */ border: none; /* 去掉默认边框 */ } // 头部样式 .brand-header { padding: 8px var(--page-padding); display: flex; justify-content: center; .brand-title { display: flex; justify-content: center; width: 100%; .title-container { display: flex; align-items: center; gap: 4px; font-family: 'Courier New', Courier, monospace; font-size: 16px; font-weight: 600; span { color: var(--primary-color); } img { height: 18px; width: 18px; margin-top: 2px; } } } } // 统计信息样式 .stats-section { display: flex; justify-content: space-around; padding: 10px 0; background-color: var(--primary-color); color: white; border-radius: 8px; margin-bottom: 10px; .stat-item { text-align: center; font-size: 1.2em; .stat-value { font-size: 2em; margin-bottom: 5px; } .stat-label { font-size: 1em; } } } // 轮播图样式 .banner-section { margin: 16px var(--page-padding); .banner-container { position: relative; overflow: hidden; border-radius: 12px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); background-color: white; .banner-img-container { display: flex; transition: transform 0.5s ease; } img { width: 100%; height: auto; } .banner-indicators { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; .indicator { width: 10px; height: 10px; border-radius: 50%; background-color: rgba(0, 0, 0, 0.5); cursor: pointer; &.active { background-color: #ffcc00; } } } .banner-arrows { position: absolute; top: 50%; transform: translateY(-50%); display: flex; gap: 16px; .arrow-btn { background-color: rgba(0, 0, 0, 0.5); padding: 8px; border-radius: 50%; color: white; cursor: pointer; ion-icon { font-size: 24px; } } } } } // 功能按钮区域样式 .features-section { display: flex; justify-content: space-between; padding: 16px; gap: 12px; .feature-button { flex: 1; height: 100px; margin: 0; --background: #ffffff; --background-activated: #f5f5f5; --border-radius: 20px; --box-shadow: none; .button-content { display: flex; flex-direction: column; align-items: center; width: 100%; gap: 8px; } .icon-wrapper { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; &.light-blue { background: #e3f2fd; } &.light-pink { background: #fce4ec; } &.light-purple { background: #f3e5f5; } ion-icon { font-size: 24px; color: var(--primary-color); } } span { font-size: 14px; color: var(--primary-color); font-weight: 500; } } } .stories-section { padding: 0 16px 16px; ion-card { margin: 0; border-radius: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); background-color: rgba(255, 255, 255, 0.5); // 设置背景颜色为白色,透明度为 0.5 .card-header-content { display: flex; justify-content: space-between; align-items: center; padding: 16px; ion-card-title { font-size: 18px; font-weight: 600; margin: 0; color: var(--primary-color); } } } ion-list { ion-item { padding: 12px; border-bottom: 1px solid #ddd; h2 { margin: 0; font-size: 14px; font-weight: 500; color: var(--primary-color); } p { margin: 4px 0 0; font-size: 12px; color: var(--text-color); } ion-row { margin-top: 8px; } } } .empty-state { text-align: center; padding: 32px 16px; ion-icon { font-size: 48px; color: #999; margin-bottom: 16px; } h3 { margin: 0 0 8px; font-size: 16px; color: var(--primary-color); } p { margin: 0; font-size: 14px; color: var(--text-color); } } } // 响应式调整 @media (max-width: 320px) { .features-section { .feature-button { height: 90px; .icon-wrapper { width: 40px; height: 40px; ion-icon { font-size: 20px; } } span { font-size: 12px; } } } }