123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525 |
- /* 基础样式 */
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- font-family: 'PingFang SC', "STSongtiSC", "Microsoft YaHei", sans-serif;
- }
- body {
- color: #333;
- line-height: 1.6;
- }
- a {
- text-decoration: none;
- color: #333;
- }
- ul {
- list-style: none;
- }
- .container {
- width: 100%;
- max-width: 1200px;
- margin: 0 auto;
- padding: 0 20px;
- }
- /* 头部样式 */
- header {
- background-color: #fff;
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
- }
- .header-top {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 15px 0;
- }
- .logo {
- font-size: 24px;
- font-weight: bold;
- color: #c8102e;
- }
- .search-bar {
- position: relative;
- }
- .search-bar input {
- padding: 8px 15px;
- border: 1px solid #ddd;
- border-radius: 20px;
- outline: none;
- width: 200px;
- transition: width 0.3s;
- }
- .search-bar input:focus {
- width: 250px;
- border-color: #c8102e;
- }
- .search-bar button {
- position: absolute;
- right: 10px;
- top: 50%;
- transform: translateY(-50%);
- background: none;
- border: none;
- color: #999;
- cursor: pointer;
- }
- /* 导航样式 */
- nav {
- background-color: #c8102e;
- }
- .nav-list {
- display: flex;
- justify-content: center;
- }
- .nav-item {
- position: relative;
- }
- .nav-item a {
- display: block;
- color: #fff;
- padding: 12px 20px;
- font-weight: 500;
- transition: background-color 0.3s;
- }
- .nav-item a:hover {
- background-color: #a60d24;
- }
- /* 轮播图样式 */
- .carousel {
- position: relative;
- width: 100%;
- height: 400px;
- overflow: hidden;
- }
- .carousel-inner {
- display: flex;
- width: 100%;
- height: 100%;
- transition: transform 0.5s ease;
- }
- .carousel-item {
- min-width: 100%;
- height: 100%;
- }
- .carousel-item img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- .carousel-control {
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- background-color: rgba(0, 0, 0, 0.3);
- color: white;
- border: none;
- width: 50px;
- height: 50px;
- border-radius: 50%;
- font-size: 20px;
- cursor: pointer;
- transition: background-color 0.3s;
- }
- .carousel-control:hover {
- background-color: rgba(0, 0, 0, 0.5);
- }
- .carousel-control.prev {
- left: 20px;
- }
- .carousel-control.next {
- right: 20px;
- }
- .carousel-indicators {
- position: absolute;
- bottom: 20px;
- left: 50%;
- transform: translateX(-50%);
- display: flex;
- gap: 10px;
- }
- .indicator {
- width: 12px;
- height: 12px;
- border-radius: 50%;
- background-color: rgba(255, 255, 255, 0.5);
- cursor: pointer;
- transition: background-color 0.3s;
- }
- .indicator.active {
- background-color: white;
- }
- /* 主要内容区域 */
- .main-content {
- padding: 40px 0;
- }
- /* 标题样式 */
- .section-title {
- display: flex;
- align-items: center;
- margin-bottom: 20px;
- padding-bottom: 10px;
- border-bottom: 2px solid #c8102e;
- }
- .section-title h2 {
- font-family: "STSongtiSC";
- font-synthesis: none;
- font-size: 20px;
- color: #c8102e;
- margin-right: 15px;
- }
- .section-title .sub-title {
- color: #666;
- padding-left: 15px;
- border-left: 1px solid #ddd;
- }
- .section-more {
- margin-left: auto;
- color: #666;
- }
- .section-more:hover {
- color: #c8102e;
- }
- /* 通知公告区域 */
- .notices-section {
- display: flex;
- gap: 30px;
- margin-bottom: 40px;
- }
- .notices-list {
- flex: 1;
- }
- .notice-item {
- padding: 15px 0;
- border-bottom: 1px dashed #ddd;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .notice-item:last-child {
- border-bottom: none;
- }
- .notice-title {
- flex: 1;
- margin-right: 15px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- transition: color 0.3s;
- }
- .notice-title:hover {
- color: #c8102e;
- }
- .notice-date {
- color: #999;
- font-size: 14px;
- }
- .featured-image {
- width: 400px;
- height: 250px;
- overflow: hidden;
- position: relative;
- }
- .featured-image img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- transition: transform 0.5s;
- }
- .featured-image:hover img {
- transform: scale(1.05);
- }
- .featured-caption {
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- background-color: rgba(0, 0, 0, 0.6);
- color: white;
- padding: 10px 15px;
- }
- .featured-caption h3 {
- font-size: 18px;
- margin-bottom: 5px;
- }
- .featured-caption p {
- font-size: 14px;
- opacity: 0.9;
- }
- /* 工作动态和党建工作区域 */
- .two-columns {
- display: flex;
- gap: 30px;
- margin-bottom: 40px;
- }
- .two-columns > div {
- flex: 1;
- }
- .news-item {
- padding: 12px 0;
- border-bottom: 1px dashed #ddd;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .news-item:last-child {
- border-bottom: none;
- }
- .news-title {
- flex: 1;
- margin-right: 15px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- transition: color 0.3s;
- }
- .news-title:hover {
- color: #c8102e;
- }
- .news-date {
- color: #999;
- font-size: 14px;
- }
- /* 精彩推荐区域 */
- .featured-section {
- margin-bottom: 40px;
- }
- .featured-grid {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: 20px;
- }
- .featured-card {
- border: 1px solid #eee;
- border-radius: 5px;
- overflow: hidden;
- transition:
- transform 0.3s,
- box-shadow 0.3s;
- }
- .featured-card:hover {
- transform: translateY(-5px);
- box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
- }
- .featured-card img {
- width: 100%;
- height: 200px;
- object-fit: cover;
- }
- .featured-card p {
- padding: 15px;
- text-align: center;
- height: 60px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- /* 公共服务区域 */
- .services-section {
- margin-bottom: 40px;
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- .services-grid {
- flex: 1;
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: 30px;
- margin-top: 60px;
- background-color: #fff1ee;
- padding: 0px 30px 40px 230px;
- border-radius: 15px;
- margin-left: -180px;
- z-index: 0;
- z-index: 0;
- }
- .service-card h3 {
- font-size: 15px;
- }
- .service-card {
- background-color: #fff;
- border-radius: 8px;
- padding: 30px 20px;
- margin-top: -15px;
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
- transition:
- transform 0.3s,
- box-shadow 0.3s;
- }
- .service-card:hover {
- transform: translateY(-5px);
- box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
- }
- .service-icon {
- width: 40px;
- height: 40px;
- margin-bottom: 10px;
- }
- .services-section .title {
- width: 220px;
- height: 220px;
- z-index: 10;
- }
- /* 底部区域 */
- footer {
- color: #fff;
- background-color: #f5f5f5;
- background-image: url(/images/footer-bg.png);
- background-position: center;
- background-size: cover;
- padding: 40px 0 20px;
- }
- .footer-links {
- display: flex;
- justify-content: center;
- margin-bottom: 20px;
- flex-wrap: wrap;
- }
- .footer-link {
- margin: 0 15px;
- color: #eee;
- }
- .footer-link:hover {
- color: #fcacb9;
- }
- .footer-info {
- text-align: center;
- color: #eee;
- font-size: 14px;
- line-height: 1.8;
- }
- .footer-select {
- text-align: center;
- margin-bottom: 20px;
- }
- .footer-select select {
- padding: 8px 15px;
- border: 1px solid #ddd;
- border-radius: 4px;
- background-color: #fff;
- cursor: pointer;
- }
- /* 响应式设计 */
- @media (max-width: 992px) {
- .notices-section {
- flex-direction: column;
- }
- .featured-image {
- width: 100%;
- height: 300px;
- }
- .featured-grid {
- grid-template-columns: repeat(2, 1fr);
- }
- }
- @media (max-width: 768px) {
- .two-columns {
- flex-direction: column;
- }
- .nav-list {
- flex-wrap: wrap;
- }
- .nav-item a {
- padding: 10px 15px;
- }
- .services-grid {
- grid-template-columns: 1fr;
- }
- }
- @media (max-width: 576px) {
- .carousel {
- height: 250px;
- }
- .featured-grid {
- grid-template-columns: 1fr;
- }
- .header-top {
- flex-direction: column;
- gap: 15px;
- }
- .search-bar {
- width: 100%;
- }
- .search-bar input {
- width: 100%;
- }
- .search-bar input:focus {
- width: 100%;
- }
- }
|