style.css 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. @charset "UTF-8";
  2. /* 基础样式 */
  3. :root {
  4. --color-primary: #db5f46;
  5. --color-secondary: #ac361e;
  6. --color-text: #333;
  7. --color-text-light: #fff;
  8. --color-border: #999;
  9. --color-box: #f9fafb;
  10. --color-mask: rgba(0, 0, 0, 0.4);
  11. --swiper-navigation-color: var(--color-primary);
  12. --swiper-pagination-color: var(--color-primary);
  13. --container-width: 1200px;
  14. }
  15. html, body {
  16. position: relative;
  17. color: var(--color-text);
  18. line-height: 1.6;
  19. font-family: "PingFang SC", "STSongtiSC", "Microsoft YaHei", sans-serif;
  20. margin: 0;
  21. padding: 0;
  22. }
  23. a {
  24. transition: color 0.3s;
  25. text-decoration: none;
  26. color: var(--color-text);
  27. }
  28. a:hover {
  29. color: var(--color-primary);
  30. }
  31. ul {
  32. list-style: none;
  33. }
  34. /* 头部样式 */
  35. header {
  36. padding: 15px 0;
  37. background-color: #fff;
  38. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  39. }
  40. header .inner {
  41. display: flex;
  42. flex-direction: row;
  43. justify-content: space-between;
  44. align-items: center;
  45. max-width: var(--container-width);
  46. margin: 0 auto;
  47. }
  48. header .logo {
  49. font-family: "STSongtiSC", "Microsoft YaHei", sans-serif;
  50. font-size: 24px;
  51. font-weight: bold;
  52. color: var(--color-primary);
  53. }
  54. header .mobile-menu-toggle {
  55. display: none;
  56. width: 60px;
  57. height: 60px;
  58. }
  59. button {
  60. display: flex;
  61. align-items: center;
  62. justify-content: center;
  63. border: none;
  64. background-color: var(--color-primary);
  65. color: var(--color-text-light);
  66. }
  67. button:hover {
  68. background-color: var(--color-secondary);
  69. }
  70. button i {
  71. color: var(--color-text-light);
  72. }
  73. /* 导航样式 */
  74. nav {
  75. position: relative;
  76. }
  77. nav .nav-list {
  78. display: flex;
  79. justify-content: center;
  80. align-items: center;
  81. margin-bottom: 0;
  82. }
  83. nav .nav-item {
  84. position: relative;
  85. }
  86. nav .nav-item.active a {
  87. font-weight: bold;
  88. color: var(--color-primary);
  89. }
  90. nav a {
  91. display: block;
  92. color: var(--color-text);
  93. padding: 12px 20px;
  94. font-weight: 500;
  95. transition: background-color 0.3s;
  96. }
  97. nav a:hover, nav a:active {
  98. color: var(--color-primary);
  99. }
  100. .search-bar {
  101. position: relative;
  102. }
  103. .search-bar button {
  104. width: 60px;
  105. height: 60px;
  106. }
  107. .search-bar button i {
  108. color: var(--color-text-light);
  109. }
  110. .search-bar input {
  111. position: absolute;
  112. right: 0;
  113. padding: 8px 15px;
  114. border: 1px solid var(--color-border);
  115. outline: none;
  116. width: 200px;
  117. height: 60px;
  118. transition: all 0.3s;
  119. opacity: 0;
  120. z-index: 20;
  121. }
  122. .search-bar input.show {
  123. width: 250px;
  124. opacity: 1;
  125. border-color: var(--color-primary);
  126. }
  127. /* 主要内容区域 */
  128. .main-content {
  129. position: relative;
  130. width: 100%;
  131. padding: 40px 0;
  132. }
  133. .main-box {
  134. background-color: var(--color-box);
  135. border-radius: 10px;
  136. padding: 26px;
  137. }
  138. .main-hr {
  139. border-color: var(--color-border);
  140. margin: 50px 0;
  141. }
  142. /* 标题样式 */
  143. .section-title {
  144. display: flex;
  145. align-items: center;
  146. margin-bottom: 20px;
  147. padding-bottom: 10px;
  148. border-bottom: 2px solid var(--color-primary);
  149. }
  150. .section-title h2 {
  151. position: relative;
  152. display: flex;
  153. flex-direction: row;
  154. align-items: center;
  155. font-family: "STSongtiSC";
  156. font-synthesis: none;
  157. font-size: 20px;
  158. color: var(--color-primary);
  159. margin-right: 15px;
  160. }
  161. .section-title h2 i {
  162. margin-right: 10px;
  163. }
  164. .section-title h2.button {
  165. cursor: pointer;
  166. color: var(--color-text);
  167. }
  168. .section-title h2.button.icon::before, .section-title h2.button.icon::after {
  169. display: none;
  170. }
  171. .section-title h2.button.active.icon::before, .section-title h2.button.active.icon::after {
  172. display: inline-block;
  173. }
  174. .section-title h2.button.active {
  175. color: var(--color-primary);
  176. }
  177. .section-title h2.icon::before, .section-title h2.icon::after {
  178. display: inline-block;
  179. content: "";
  180. margin: 0 10px;
  181. width: 20px;
  182. height: 20px;
  183. background-size: 20px 20px;
  184. background-image: url(/images/badge.png);
  185. background-position: center;
  186. }
  187. .section-title .sub-title {
  188. color: #666;
  189. padding-left: 15px;
  190. border-left: 1px solid #ddd;
  191. }
  192. .section-more {
  193. margin-left: auto;
  194. color: #666;
  195. }
  196. .section-more:hover {
  197. color: var(--color-primary);
  198. }
  199. /* 通知公告区域 */
  200. .notices-section {
  201. display: flex;
  202. gap: 30px;
  203. margin-bottom: 40px;
  204. }
  205. .notice-item {
  206. position: relative;
  207. padding: 15px 0;
  208. border-bottom: 1px dashed #ddd;
  209. display: flex;
  210. justify-content: space-between;
  211. align-items: center;
  212. }
  213. .notice-item > div {
  214. max-width: 86%;
  215. flex: 1;
  216. flex-direction: column;
  217. margin-right: 15px;
  218. overflow: hidden;
  219. }
  220. .notice-item p {
  221. opacity: 0;
  222. height: 0px;
  223. margin-bottom: 0;
  224. transition: all ease-in-out 0.25s;
  225. }
  226. .notice-item:last-child {
  227. border-bottom: none;
  228. }
  229. .notice-item:hover .notice-title {
  230. font-size: 20px;
  231. opacity: 1;
  232. }
  233. .notice-item:hover p {
  234. opacity: 1;
  235. height: 85px;
  236. }
  237. .notice-title {
  238. display: block;
  239. width: 100%;
  240. white-space: nowrap;
  241. overflow: hidden;
  242. text-overflow: ellipsis;
  243. transition: all 0.3s;
  244. }
  245. .notice-date {
  246. color: #999;
  247. font-size: 14px;
  248. }
  249. .featured-image {
  250. border-radius: 6px;
  251. overflow: hidden;
  252. position: relative;
  253. }
  254. .featured-image img {
  255. width: 100%;
  256. height: 100%;
  257. object-fit: cover;
  258. transition: transform 0.5s;
  259. }
  260. .featured-image .caption {
  261. position: absolute;
  262. bottom: 0;
  263. left: 0;
  264. right: 0;
  265. background-color: var(--color-mask);
  266. color: var(--color-text-light);
  267. padding: 8px 20px;
  268. }
  269. .featured-image .caption h3 {
  270. font-size: 18px;
  271. margin-bottom: 5px;
  272. }
  273. .featured-image .caption p {
  274. font-size: 14px;
  275. opacity: 0.9;
  276. }
  277. .featured-image:hover img {
  278. transform: scale(1.05);
  279. }
  280. /* 工作动态和党建工作区域 */
  281. .news-item {
  282. padding: 12px 0;
  283. border-bottom: 1px dashed #ddd;
  284. display: flex;
  285. justify-content: space-between;
  286. align-items: center;
  287. }
  288. .news-item:last-child {
  289. border-bottom: none;
  290. }
  291. .news-item .title {
  292. flex: 1;
  293. margin-right: 15px;
  294. white-space: nowrap;
  295. overflow: hidden;
  296. text-overflow: ellipsis;
  297. transition: color 0.3s;
  298. }
  299. .news-item .title:hover {
  300. color: var(--color-primary);
  301. }
  302. .news-item .date {
  303. color: #999;
  304. font-size: 14px;
  305. }
  306. /* 精彩推荐区域 */
  307. .featured-section {
  308. margin-bottom: 40px;
  309. }
  310. .featured-grid {
  311. display: grid;
  312. grid-template-columns: repeat(3, 1fr);
  313. gap: 20px;
  314. }
  315. .featured-card {
  316. position: relative;
  317. border: 1px solid #eee;
  318. border-radius: 5px;
  319. overflow: hidden;
  320. transition: transform 0.3s, box-shadow 0.3s;
  321. cursor: pointer;
  322. }
  323. .featured-card p {
  324. position: absolute;
  325. bottom: 0;
  326. left: 0;
  327. right: 0;
  328. background-color: var(--color-mask);
  329. color: var(--color-text-light);
  330. padding: 15px;
  331. z-index: 1;
  332. margin-bottom: 0;
  333. }
  334. .featured-card img {
  335. width: 100%;
  336. height: 200px;
  337. object-fit: cover;
  338. }
  339. .featured-card:hover {
  340. transform: translateY(-5px);
  341. box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  342. }
  343. /* 公共服务区域 */
  344. .services-section {
  345. margin-bottom: 40px;
  346. display: flex;
  347. flex-direction: row;
  348. align-items: center;
  349. }
  350. .services-section .title {
  351. width: 220px;
  352. height: 220px;
  353. z-index: 10;
  354. }
  355. .services-grid {
  356. flex: 1;
  357. display: grid;
  358. grid-template-columns: repeat(3, 1fr);
  359. gap: 30px;
  360. margin-top: 60px;
  361. background-color: #fff1ee;
  362. padding: 0px 30px 40px 230px;
  363. border-radius: 15px;
  364. margin-left: -180px;
  365. z-index: 0;
  366. z-index: 0;
  367. }
  368. .service-card {
  369. background-color: #fff;
  370. border-radius: 8px;
  371. padding: 30px 20px;
  372. margin-top: -15px;
  373. box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  374. transition: transform 0.3s, box-shadow 0.3s;
  375. }
  376. .service-card h3 {
  377. font-size: 15px;
  378. }
  379. .service-card .icon {
  380. width: 40px;
  381. height: 40px;
  382. margin-bottom: 10px;
  383. }
  384. .service-card:hover {
  385. transform: translateY(-5px);
  386. box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  387. }
  388. /* 底部区域 */
  389. footer {
  390. color: #fff;
  391. background-color: #f5f5f5;
  392. background-image: url(/images/footer-bg.png);
  393. background-position: center;
  394. background-size: cover;
  395. padding: 40px 0 20px;
  396. }
  397. .footer-links {
  398. display: flex;
  399. justify-content: center;
  400. margin-bottom: 20px;
  401. flex-wrap: wrap;
  402. }
  403. .footer-link {
  404. margin: 0 15px;
  405. color: #eee;
  406. }
  407. .footer-link:hover {
  408. color: #fcacb9;
  409. }
  410. .footer-info {
  411. text-align: center;
  412. color: #eee;
  413. font-size: 14px;
  414. line-height: 1.8;
  415. }
  416. .footer-select {
  417. text-align: center;
  418. margin-bottom: 20px;
  419. color: var(--color-text-light);
  420. }
  421. .footer-select select {
  422. color: #666;
  423. padding: 8px 45px 8px 15px;
  424. border: 1px solid rgba(221, 221, 221, 0.6);
  425. border-radius: 6px;
  426. background-color: rgba(255, 255, 255, 0.25);
  427. cursor: pointer;
  428. }
  429. @media (max-width: 992px) {
  430. .featured-image {
  431. width: 100%;
  432. height: 300px;
  433. }
  434. .featured-grid {
  435. grid-template-columns: repeat(2, 1fr);
  436. }
  437. }
  438. @media (max-width: 768px) {
  439. .nav-list {
  440. flex-wrap: wrap;
  441. }
  442. .nav-item a {
  443. padding: 10px 15px;
  444. }
  445. .services-grid {
  446. grid-template-columns: 1fr;
  447. }
  448. }
  449. @media (max-width: 576px) {
  450. header nav {
  451. position: absolute;
  452. top: 0;
  453. opacity: 0;
  454. left: 0;
  455. right: 0;
  456. padding: 20px;
  457. background-color: var(--color-box);
  458. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  459. transition: all 0.3s;
  460. transform: translateY(-100%);
  461. z-index: 100;
  462. }
  463. header nav.show {
  464. display: block;
  465. opacity: 1;
  466. transform: translateY(0%);
  467. }
  468. .nav-list {
  469. flex-direction: column;
  470. }
  471. .nav-item {
  472. margin-bottom: 10px;
  473. }
  474. header .inner {
  475. padding: 0 20px;
  476. }
  477. header .mobile-menu-toggle {
  478. display: unset;
  479. width: 40px;
  480. height: 40px;
  481. }
  482. .search-bar button {
  483. width: 40px;
  484. height: 40px;
  485. }
  486. header .logo {
  487. font-size: 18px;
  488. }
  489. .featured-grid {
  490. grid-template-columns: 1fr;
  491. }
  492. .main-box {
  493. padding: 15px;
  494. }
  495. .services-section {
  496. align-items: flex-start;
  497. }
  498. .services-grid {
  499. padding: 210px 30px 40px 30px;
  500. }
  501. }
  502. /*# sourceMappingURL=style.css.map */