style.scss 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  1. /* 基础样式 */
  2. :root {
  3. --color-primary: #db5f46;
  4. --color-secondary: #ac361e;
  5. --color-text: #333;
  6. --color-text-light: #fff;
  7. --color-text-dark: #000;
  8. --color-text-secondary: #888;
  9. --color-border: #ddd;
  10. --color-box: #f9fafb;
  11. --color-mask: rgba(0, 0, 0, 0.4);
  12. --swiper-navigation-color: var(--color-primary);
  13. --swiper-pagination-color: var(--color-primary);
  14. --container-width: 1200px;
  15. }
  16. html, body {
  17. position: relative;
  18. color: var(--color-text);
  19. line-height: 1.6;
  20. font-family: 'PingFang SC', 'STSongtiSC', "Microsoft YaHei", sans-serif;
  21. margin: 0;
  22. padding: 0;
  23. }
  24. a {
  25. transition: color 0.3s;
  26. text-decoration: none;
  27. color: var(--color-text);
  28. &:hover {
  29. color: var(--color-primary);
  30. }
  31. }
  32. ul {
  33. list-style: none;
  34. }
  35. /* 头部样式 */
  36. header {
  37. padding: 15px 0;
  38. background-color: #fff;
  39. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  40. .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. .logo {
  49. font-family: 'STSongtiSC', "Microsoft YaHei", sans-serif;
  50. font-size: 24px;
  51. font-weight: bold;
  52. color: var(--color-primary);
  53. }
  54. .mobile-menu-toggle {
  55. display: none;
  56. width: 60px;
  57. height: 60px;
  58. }
  59. }
  60. button {
  61. display: flex;
  62. align-items: center;
  63. justify-content: center;
  64. border: none;
  65. background-color: var(--color-primary);
  66. color: var(--color-text-light);
  67. &:hover {
  68. background-color: var(--color-secondary);
  69. }
  70. & i {
  71. color: var(--color-text-light);
  72. }
  73. &.bordered {
  74. color: var(--color-text);
  75. background-color: #f3f3f3;
  76. background-repeat: no-repeat;
  77. background-size: 100% 100%;
  78. /* 九宫格切图实现 - 防止图片变形 */
  79. border-image: url('../images/button-deactive.png') 25 25 25 25 stretch;
  80. border-width: 10px;
  81. border-style: solid;
  82. background-clip: padding-box;
  83. padding: 0 16px;
  84. margin-right: 8px;
  85. cursor: pointer;
  86. font-size: 14px;
  87. font-family: "STSongtiSC";
  88. box-sizing: border-box;
  89. &:hover,
  90. &.active {
  91. color: var(--color-text-light);
  92. background-color: #d74a2e;
  93. border-image: url('../images/button-active.png') 25 25 25 25 stretch;
  94. }
  95. }
  96. }
  97. .bordered-input {
  98. color: var(--color-text);
  99. border-style: solid;
  100. border-width: 10px;
  101. border-image: url('../images/button-deactive.png') 25 25 25 25 stretch;
  102. input {
  103. background-color: #f3f3f3;
  104. border: none;
  105. font-size: 15px;
  106. font-family: "STSongtiSC";
  107. color: var(--color-text);
  108. width: 220px;
  109. &:focus {
  110. outline: none;
  111. }
  112. }
  113. }
  114. /* 导航样式 */
  115. nav.main-nav {
  116. position: relative;
  117. .nav-list {
  118. display: flex;
  119. justify-content: center;
  120. align-items: center;
  121. margin-bottom: 0;
  122. }
  123. .nav-item {
  124. position: relative;
  125. &.active a {
  126. font-weight: bold;
  127. color: var(--color-primary);
  128. }
  129. }
  130. a {
  131. display: block;
  132. color: var(--color-text);
  133. padding: 12px 20px;
  134. font-weight: 500;
  135. transition: background-color 0.3s;
  136. &:hover, &:active {
  137. color: var(--color-primary);
  138. }
  139. }
  140. }
  141. .search-bar {
  142. position: relative;
  143. button {
  144. width: 60px;
  145. height: 60px;
  146. i {
  147. color: var(--color-text-light);
  148. }
  149. }
  150. input {
  151. position: absolute;
  152. right: 0;
  153. padding: 8px 15px;
  154. border: 1px solid var(--color-border);
  155. outline: none;
  156. width: 200px;
  157. height: 60px;
  158. transition: all 0.3s;
  159. opacity: 0;
  160. z-index: 20;
  161. &.show {
  162. width: 250px;
  163. opacity: 1;
  164. border-color: var(--color-primary);
  165. }
  166. }
  167. }
  168. /* 主要内容区域 */
  169. .main-content {
  170. position: relative;
  171. width: 100%;
  172. padding: 40px 0;
  173. }
  174. .main-box {
  175. background-color: var(--color-box);
  176. border-radius: 10px;
  177. padding: 26px;
  178. }
  179. .main-hr {
  180. border-color: var(--color-border);
  181. margin: 50px 0;
  182. }
  183. /* 标题样式 */
  184. .section-title {
  185. display: flex;
  186. flex-direction: row;
  187. align-items: center;
  188. justify-content: space-between;
  189. margin-bottom: 20px;
  190. padding-bottom: 10px;
  191. border-bottom: 2px solid var(--color-primary);
  192. &.center {
  193. justify-content: center;
  194. }
  195. &.large {
  196. border-bottom: none;
  197. h2 {
  198. font-size: 30px;
  199. &.icon {
  200. &::before, &::after {
  201. width: 28px;
  202. height: 28px;
  203. background-size: 28px 28px;
  204. }
  205. }
  206. }
  207. }
  208. h2 {
  209. position: relative;
  210. display: flex;
  211. flex-direction: row;
  212. align-items: center;
  213. font-family: "STSongtiSC";
  214. font-synthesis: none;
  215. font-size: 20px;
  216. color: var(--color-primary);
  217. margin-right: 15px;
  218. i {
  219. margin-right: 10px;
  220. }
  221. &.button {
  222. cursor: pointer;
  223. color: var(--color-text);
  224. &.icon {
  225. &::before, &::after {
  226. display: none;
  227. }
  228. }
  229. &.active {
  230. &.icon {
  231. &::before, &::after {
  232. display: inline-block;
  233. }
  234. }
  235. color: var(--color-primary);
  236. }
  237. }
  238. &.icon {
  239. &::before, &::after {
  240. display: inline-block;
  241. content: '';
  242. margin: 0 10px;
  243. width: 20px;
  244. height: 20px;
  245. background-size: 20px 20px;
  246. background-image: url(/images/badge.png);
  247. background-position: center;
  248. }
  249. }
  250. }
  251. .sub-title {
  252. color: #666;
  253. padding-left: 15px;
  254. border-left: 1px solid #ddd;
  255. }
  256. }
  257. .section-more {
  258. margin-left: auto;
  259. color: #666;
  260. &:hover {
  261. color: var(--color-primary);
  262. }
  263. }
  264. /* 通知公告区域 */
  265. .notices-section {
  266. display: flex;
  267. gap: 30px;
  268. margin-bottom: 40px;
  269. }
  270. .notice-item {
  271. position: relative;
  272. padding: 15px 0;
  273. border-bottom: 1px dashed #ddd;
  274. display: flex;
  275. justify-content: space-between;
  276. align-items: center;
  277. > div {
  278. max-width: 86%;
  279. flex: 1;
  280. flex-direction: column;
  281. margin-right: 15px;
  282. overflow: hidden;
  283. }
  284. p {
  285. opacity: 0;
  286. height: 0px;
  287. margin-bottom: 0;
  288. transition: all ease-in-out 0.25s;
  289. }
  290. &:last-child {
  291. border-bottom: none;
  292. }
  293. &:hover {
  294. .notice-title {
  295. font-size: 20px;
  296. opacity: 1;
  297. }
  298. p {
  299. opacity: 1;
  300. height: 85px;
  301. }
  302. }
  303. }
  304. .notice-title {
  305. display: block;
  306. width: 100%;
  307. white-space: nowrap;
  308. overflow: hidden;
  309. text-overflow: ellipsis;
  310. transition: all 0.3s;
  311. }
  312. .notice-date {
  313. color: #999;
  314. font-size: 14px;
  315. }
  316. .featured-image {
  317. border-radius: 6px;
  318. overflow: hidden;
  319. position: relative;
  320. img {
  321. width: 100%;
  322. height: 100%;
  323. object-fit: cover;
  324. transition: transform 0.5s;
  325. }
  326. .caption {
  327. position: absolute;
  328. bottom: 0;
  329. left: 0;
  330. right: 0;
  331. background-color: var(--color-mask);
  332. color: var(--color-text-light);
  333. padding: 8px 20px;
  334. h3 {
  335. font-size: 18px;
  336. margin-bottom: 5px;
  337. }
  338. p {
  339. font-size: 14px;
  340. opacity: 0.9;
  341. }
  342. }
  343. &:hover img {
  344. transform: scale(1.05);
  345. }
  346. }
  347. .news-item {
  348. padding: 12px 0;
  349. border-bottom: 1px dashed #ddd;
  350. display: flex;
  351. justify-content: space-between;
  352. align-items: center;
  353. &:last-child {
  354. border-bottom: none;
  355. }
  356. &.dark {
  357. .title {
  358. color: var(--color-text-dark);
  359. }
  360. }
  361. .title {
  362. flex: 1;
  363. margin-right: 15px;
  364. white-space: nowrap;
  365. overflow: hidden;
  366. text-overflow: ellipsis;
  367. transition: color 0.3s;
  368. &:hover {
  369. color: var(--color-primary);
  370. }
  371. }
  372. .date {
  373. color: #999;
  374. font-size: 14px;
  375. }
  376. }
  377. /* 精彩推荐区域 */
  378. .featured-section {
  379. margin-bottom: 40px;
  380. }
  381. .featured-grid {
  382. display: grid;
  383. grid-template-columns: repeat(3, 1fr);
  384. gap: 20px;
  385. }
  386. .featured-card {
  387. position: relative;
  388. border: 1px solid #eee;
  389. border-radius: 5px;
  390. overflow: hidden;
  391. transition:
  392. transform 0.3s,
  393. box-shadow 0.3s;
  394. cursor: pointer;
  395. p {
  396. position: absolute;
  397. bottom: 0;
  398. left: 0;
  399. right: 0;
  400. background-color: var(--color-mask);
  401. color: var(--color-text-light);
  402. padding: 15px;
  403. z-index: 1;
  404. margin-bottom: 0;
  405. }
  406. img {
  407. width: 100%;
  408. height: 200px;
  409. object-fit: cover;
  410. }
  411. &:hover {
  412. transform: translateY(-5px);
  413. box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  414. }
  415. }
  416. /* 公共服务区域 */
  417. .services-section {
  418. margin-bottom: 40px;
  419. display: flex;
  420. flex-direction: row;
  421. align-items: center;
  422. .title {
  423. width: 220px;
  424. height: 220px;
  425. z-index: 10;
  426. }
  427. }
  428. .services-grid {
  429. flex: 1;
  430. display: grid;
  431. grid-template-columns: repeat(3, 1fr);
  432. gap: 30px;
  433. margin-top: 60px;
  434. background-color: #fff1ee;
  435. padding: 0px 30px 40px 230px;
  436. border-radius: 15px;
  437. margin-left: -180px;
  438. z-index: 0;
  439. z-index: 0;
  440. }
  441. .service-card {
  442. background-color: #fff;
  443. border-radius: 8px;
  444. padding: 30px 20px;
  445. margin-top: -15px;
  446. box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  447. transition:
  448. transform 0.3s,
  449. box-shadow 0.3s;
  450. h3 {
  451. font-size: 15px;
  452. }
  453. .icon {
  454. width: 40px;
  455. height: 40px;
  456. margin-bottom: 10px;
  457. }
  458. &:hover {
  459. transform: translateY(-5px);
  460. box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  461. }
  462. }
  463. /* 底部区域 */
  464. footer {
  465. color: #fff;
  466. background-color: #f5f5f5;
  467. background-image: url(/images/footer-bg.png);
  468. background-position: center;
  469. background-size: cover;
  470. padding: 40px 0 20px;
  471. }
  472. .footer-links {
  473. display: flex;
  474. justify-content: center;
  475. margin-bottom: 20px;
  476. flex-wrap: wrap;
  477. }
  478. .footer-link {
  479. margin: 0 15px;
  480. color: #eee;
  481. &:hover {
  482. color: #fcacb9;
  483. }
  484. }
  485. .footer-info {
  486. text-align: center;
  487. color: #eee;
  488. font-size: 14px;
  489. line-height: 1.8;
  490. }
  491. .footer-select {
  492. text-align: center;
  493. margin-bottom: 20px;
  494. color: var(--color-text-light);
  495. select {
  496. color: #666;
  497. padding: 8px 45px 8px 15px;
  498. border: 1px solid rgba(221, 221, 221, 0.6);
  499. border-radius: 6px;
  500. background-color: rgba(255, 255, 255, 0.25);
  501. cursor: pointer;
  502. }
  503. }
  504. .sidebar {
  505. .title {
  506. position: relative;
  507. padding: 20px;
  508. background-color: var(--color-primary);
  509. color: var(--color-text-light);
  510. text-align: center;
  511. border-radius: 4px 4px 0 0;
  512. background-image: url(/images/tab-active.png);
  513. background-size: 100% 100%;
  514. background-repeat: no-repeat;
  515. height: 100px;
  516. margin-bottom: 20px;
  517. border: 1px solid var(--color-border);
  518. border-radius: 4px;
  519. h2 {
  520. position: relative;
  521. margin: 0;
  522. font-size: 30px;
  523. font-weight: bold;
  524. font-family: "STSongtiSC";
  525. line-height: 50px;
  526. z-index: 2;
  527. }
  528. }
  529. }
  530. .sidebar-menu {
  531. list-style: none;
  532. padding: 0;
  533. margin: 0;
  534. li {
  535. border-bottom: 1px solid var(--color-border);
  536. &.active a {
  537. color: var(--color-primary);
  538. }
  539. a {
  540. display: flex;
  541. flex-direction: row;
  542. justify-content: space-between;
  543. align-items: center;
  544. padding: 15px 20px;
  545. color: var(--color-text);
  546. text-decoration: none;
  547. transition: all 0.3s;
  548. i {
  549. color: var(--color-primary);
  550. }
  551. &:hover {
  552. color: var(--color-primary);
  553. }
  554. }
  555. &:last-child {
  556. border-bottom: none;
  557. }
  558. }
  559. }
  560. .pagination {
  561. display: flex;
  562. justify-content: center;
  563. align-items: center;
  564. margin-top: 20px;
  565. li {
  566. margin: 0 5px;
  567. border: 1px solid var(--color-border);
  568. border-radius: 6px;
  569. padding: 6px 10px;
  570. &.active {
  571. border-color: var(--color-primary);
  572. a {
  573. color: var(--color-primary);
  574. }
  575. }
  576. }
  577. }
  578. .news-detail {
  579. h1 {
  580. text-align: center;
  581. font-size: 30px;
  582. }
  583. .times {
  584. display: flex;
  585. flex-direction: row;
  586. justify-content: space-around;
  587. align-items: center;
  588. color: var(--color-text-secondary);
  589. padding: 20px 0;
  590. margin-bottom: 20px;
  591. border-bottom: 1px solid var(--color-border);
  592. p {
  593. margin-bottom: 0;
  594. font-size: 15px;
  595. }
  596. }
  597. }
  598. /* 联系我们页面样式 */
  599. .contact-info {
  600. padding-right: 30px;
  601. }
  602. .info-list {
  603. padding-left: 0;
  604. }
  605. .info-item {
  606. display: flex;
  607. flex-direction: row;
  608. padding: 10px 0;
  609. align-items: center;
  610. transition: transform 0.3s, box-shadow 0.3s;
  611. &:hover {
  612. transform: translateY(-3px);
  613. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  614. }
  615. i {
  616. color: var(--color-primary);
  617. font-size: 20px;
  618. margin-right: 15px;
  619. width: 30px;
  620. text-align: center;
  621. }
  622. }
  623. .map-section {
  624. position: relative;
  625. height: 100%;
  626. }
  627. #map-container {
  628. border-radius: 8px;
  629. overflow: hidden;
  630. margin-bottom: 20px;
  631. }
  632. @media (max-width: 992px) {
  633. .featured-image {
  634. width: 100%;
  635. height: 300px;
  636. }
  637. .featured-grid {
  638. grid-template-columns: repeat(2, 1fr);
  639. }
  640. header {
  641. .inner {
  642. padding: 0 30px;
  643. }
  644. .logo {
  645. font-size: 20px;
  646. }
  647. }
  648. nav.main-nav .nav-item {
  649. padding: 0;
  650. a {
  651. padding: 10px 5px;
  652. }
  653. }
  654. }
  655. @media (max-width: 768px) {
  656. header {
  657. .inner {
  658. padding: 0 30px;
  659. }
  660. .logo {
  661. font-size: 20px;
  662. }
  663. .mobile-menu-toggle {
  664. display: unset;
  665. width: 40px;
  666. height: 40px;
  667. }
  668. .search-bar button {
  669. width: 40px;
  670. height: 40px;
  671. }
  672. }
  673. nav.main-nav {
  674. position: absolute;
  675. top: 0;
  676. opacity: 0;
  677. left: 0;
  678. right: 0;
  679. padding: 20px;
  680. background-color: var(--color-box);
  681. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  682. transition: all 0.3s;
  683. transform: translateY(-100%);
  684. z-index: 100;
  685. &.show {
  686. display: block;
  687. opacity: 1;
  688. transform: translateY(0%);
  689. }
  690. .nav-list {
  691. flex-direction: column;
  692. }
  693. .nav-item {
  694. margin-bottom: 10px;
  695. }
  696. }
  697. .services-grid {
  698. grid-template-columns: 1fr;
  699. }
  700. }
  701. @media (max-width: 576px) {
  702. .featured-grid {
  703. grid-template-columns: 1fr;
  704. }
  705. .main-box {
  706. padding: 15px;
  707. }
  708. .services-section {
  709. align-items: flex-start;
  710. }
  711. .services-grid {
  712. padding: 210px 30px 40px 30px;
  713. }
  714. header {
  715. .inner {
  716. padding: 0 20px;
  717. }
  718. .logo {
  719. font-size: 18px;
  720. }
  721. }
  722. }