/* 新闻资讯页面样式 */ /* 页面横幅 */ .page-banner { height: 625px; background: url('../../images/tmbannerxwzx.png') center/cover no-repeat; display: flex; align-items: flex-end; justify-content: center; position: relative; margin-top: 80px; } .news-banner .banner-content { display: none; } .news-page { background: white; padding: 60px 0 80px; } /* 新闻列表 */ .news-list { margin-bottom: 60px; padding: 0 40px; } /* 卡片式新闻网格 */ .news-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 60px; } .news-card { background: white; border-radius: 10px; overflow: hidden; transition: all 0.3s; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); } .news-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); } .news-card .news-image { width: 100%; height: 280px; overflow: hidden; } .news-card .news-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; } .news-card:hover .news-image img { transform: scale(1.1); } .news-card-content { padding: 30px; } .news-card-content .news-date { color: var(--text-light); font-size: 14px; margin-bottom: 15px; } .news-card-content .news-title { font-size: 18px; line-height: 1.6; margin-bottom: 15px; color: #333; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .news-card-content .news-excerpt { color: var(--text-light); font-size: 14px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } .news-item { display: flex; align-items: center; gap: 30px; padding: 30px 0; border-bottom: 1px solid #e5e5e5; transition: all 0.3s ease; cursor: pointer; position: relative; margin: 0 -40px; padding-left: 40px; padding-right: 40px; } .news-item:hover { background: linear-gradient(135deg, #1B51BE 0%, #0e5aa7 100%); color: white; border-bottom: 1px solid #1B51BE; box-shadow: 0 2px 8px rgba(27, 81, 190, 0.2); } .news-item:hover .news-date { color: white; } .news-item:hover .date-day, .news-item:hover .date-year { color: white; } .news-item:hover .news-title { color: white; } .news-item:hover .news-excerpt { color: rgba(255, 255, 255, 0.9); } /* 日期 */ .news-date { flex: 0 0 110px; text-align: center; position: relative; padding-right: 30px; display: flex; flex-direction: column; justify-content: center; } /* 日期右边的竖线 */ .news-date::after { content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 60px; background: #e5e5e5; transition: background 0.3s ease; } .news-item:hover .news-date::after { background: rgba(255, 255, 255, 0.3); } .date-day { display: block; font-size: 32px; font-weight: 600; color: #333; line-height: 1; margin-bottom: 8px; } .date-year { display: block; font-size: 14px; color: #999; line-height: 1; } /* 内容 */ .news-content { flex: 1; min-width: 0; } .news-title { font-size: 16px; font-weight: 500; color: #333; line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; } .news-excerpt { font-size: 14px; color: #666; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; } /* 箭头 */ .news-arrow { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: #f5f5f5; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #999; transition: all 0.3s ease; } .news-item:hover .news-arrow { background: white; color: var(--primary-color); transform: translateX(5px); } /* 分页 */ .pagination { display: flex; justify-content: center; margin-top: 50px; } .pagination-list { display: flex; list-style: none; padding: 0; margin: 0; gap: 10px; align-items: center; } .pagination-item { list-style: none; } .pagination-link { display: inline-block; padding: 8px 16px; border: 1px solid #ddd; background: white; color: #666; border-radius: 4px; cursor: pointer; font-size: 14px; text-decoration: none; transition: all 0.3s ease; } .pagination-link:hover { border-color: var(--primary-color); color: var(--primary-color); background: #f5f8ff; } .pagination-link.active { background: var(--primary-color); color: white; border-color: var(--primary-color); } .pagination-link.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; } /* 响应式设计 */ @media (max-width: 1024px) { .news-banner { height: 250px; } .news-page { padding: 40px 0 60px; } .news-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; } .news-item { gap: 20px; padding: 25px 0; } .news-date { flex: 0 0 90px; } .date-day { font-size: 28px; } } @media (max-width: 768px) { .news-banner { height: 200px; } .news-page { padding: 30px 0 50px; } .news-list { padding: 0 20px; } .news-cards-grid { grid-template-columns: 1fr; gap: 25px; } .news-card .news-image { height: 220px; } .news-card-content { padding: 25px; } .news-item { flex-direction: column; gap: 15px; padding: 20px; margin: 0 -20px; } .news-date { flex: 0 0 auto; display: flex; flex-direction: row; align-items: center; gap: 10px; text-align: left; padding-top: 0; padding-right: 15px; } .news-date::after { display: none; } .date-day { font-size: 24px; margin-bottom: 0; font-weight: 600; } .date-year { font-size: 14px; } .news-title { font-size: 15px; -webkit-line-clamp: 3; } .news-excerpt { font-size: 13px; -webkit-line-clamp: 3; } .news-arrow { position: absolute; right: 20px; top: 20px; width: 35px; height: 35px; font-size: 16px; } .pagination { margin-top: 40px; } .pagination-list { flex-wrap: wrap; gap: 8px; } .pagination-link { padding: 6px 12px; font-size: 13px; } } @media (max-width: 480px) { .news-banner { height: 180px; } .news-list { padding: 0 15px; } .news-cards-grid { gap: 20px; } .news-card .news-image { height: 200px; } .news-card-content { padding: 20px; } .news-card-content .news-title { font-size: 16px; } .news-card-content .news-excerpt { font-size: 13px; } .news-item { padding: 15px; margin: 0 -15px; } .date-day { font-size: 22px; font-weight: 600; } .date-year { font-size: 13px; } .news-title { font-size: 14px; margin-bottom: 10px; } .news-excerpt { font-size: 12px; } .pagination { margin-top: 30px; } .pagination-link { padding: 5px 10px; font-size: 12px; } }