History.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <div class="history">
  3. <h1>
  4. {{ timeList[activeTimeId] }}
  5. </h1>
  6. <menu>
  7. <img
  8. class="circle-no-light"
  9. src="@/assets/images/circle-no-light.png"
  10. alt=""
  11. draggable="false"
  12. >
  13. <img
  14. class="circle"
  15. src="@/assets/images/circle.png"
  16. alt=""
  17. draggable="false"
  18. >
  19. <ul>
  20. <li
  21. v-for="(time, idx) in timeList"
  22. :key="idx"
  23. :class="{active: activeTimeId === idx}"
  24. @click="activeTimeId = idx"
  25. >
  26. <div
  27. class="point"
  28. />
  29. {{ time }}
  30. </li>
  31. </ul>
  32. </menu>
  33. </div>
  34. </template>
  35. <script>
  36. import {
  37. ref,
  38. reactive,
  39. } from 'vue'
  40. export default {
  41. name: 'HistoryView',
  42. setup () {
  43. const timeList = reactive([
  44. '开埠通商',
  45. '曲折发展',
  46. '步履维艰',
  47. '筚路蓝缕',
  48. '改革开放',
  49. '战略负重',
  50. '创新驱动',
  51. '追梦未来',
  52. ])
  53. const activeTimeId = ref(0)
  54. return {
  55. timeList,
  56. activeTimeId,
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="less" scoped>
  62. .history {
  63. >h1 {
  64. position: absolute;
  65. top: 51px;
  66. left: 81px;
  67. max-width: 50%;
  68. overflow: hidden;
  69. white-space: pre;
  70. text-overflow: ellipsis;
  71. font-size: 48px;
  72. font-family: Source Han Sans CN-Heavy, Source Han Sans CN;
  73. font-weight: 800;
  74. color: #FFFFFF;
  75. padding-top: 20px;
  76. padding-bottom: 20px;
  77. border-top: 1px solid rgba(217, 217, 217, 0.2);
  78. border-bottom: 1px solid rgba(217, 217, 217, 0.2);
  79. }
  80. >menu {
  81. position: absolute;
  82. top: 214px;
  83. left: 0;
  84. >img.circle-no-light {
  85. position: absolute;
  86. top: -20%;
  87. left: -60px;
  88. height: 130%;
  89. pointer-events: none;
  90. }
  91. >img.circle {
  92. position: absolute;
  93. top: -20%;
  94. left: -60px;
  95. height: 130%;
  96. pointer-events: none;
  97. z-index: 1;
  98. }
  99. >ul {
  100. >li {
  101. display: flex;
  102. justify-content: flex-end;
  103. align-items: center;
  104. height: 50px;
  105. background: linear-gradient(270deg, #3A454F 0%, rgba(22,28,33,0) 100%);
  106. // border-radius: 3px;
  107. border: 1px solid;
  108. border-left: none;
  109. border-image: linear-gradient(270deg, rgba(78, 96, 112, 1), rgba(78, 96, 112, 0)) 1 1;
  110. margin-bottom: 15px;
  111. font-size: 20px;
  112. font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  113. font-weight: 400;
  114. color: rgba(255, 255, 255, 0.5);
  115. // backdrop-filter: blur(5px); // 会导致产生层叠上下文!!!使得圆点无法在弧线上层!!!
  116. padding-right: 14px;
  117. cursor: pointer;
  118. position: relative;
  119. >.point {
  120. position: absolute;
  121. top: 50%;
  122. transform: translateY(-50%);
  123. width: 8px;
  124. height: 8px;
  125. border-radius: 4px;
  126. background: #D1DCE5;
  127. box-shadow: 0px 0px 12px 0px #6D9DC6, 0px 0px 8px 0px #6D9DC6;
  128. z-index: 2;
  129. }
  130. &:hover {
  131. background: linear-gradient(270deg, #B0A179 0%, rgba(255,209,91,0) 100%);
  132. border-image: linear-gradient(270deg, rgba(176, 161, 121, 1), rgba(176, 161, 121, 0)) 1 1;
  133. }
  134. &.active {
  135. font-size: 24px;
  136. font-family: Source Han Sans CN-Bold, Source Han Sans CN;
  137. font-weight: bold;
  138. color: #FFFFFF;
  139. text-shadow: 0px 0px 10px #8B7C54;
  140. >.point {
  141. background: #FFFFFF;
  142. box-shadow: 0px 0px 12px 0px #FFD15B, 0px 0px 8px 0px #FFD15B, 0px 0px 10px 0px #FFD15B, 0px 0px 5px 0px #FFD15B;
  143. }
  144. }
  145. &:nth-of-type(1) {
  146. width: calc(170px + 25px * 1);
  147. >.point {
  148. margin-right: calc(48px + 80px);
  149. }
  150. }
  151. &:nth-of-type(2) {
  152. width: calc(170px + 25px * 2);
  153. >.point {
  154. margin-right: calc(43px + 80px);
  155. }
  156. }
  157. &:nth-of-type(3) {
  158. width: calc(170px + 25px * 3);
  159. >.point {
  160. margin-right: calc(50px + 80px);
  161. }
  162. }
  163. &:nth-of-type(4) {
  164. width: calc(170px + 25px * 4);
  165. >.point {
  166. margin-right: calc(65px + 80px);
  167. }
  168. }
  169. &:nth-of-type(5) {
  170. width: calc(170px + 25px * 3);
  171. >.point {
  172. margin-right: calc(40px + 80px);
  173. }
  174. }
  175. &:nth-of-type(6) {
  176. width: calc(170px + 25px * 2);
  177. >.point {
  178. margin-right: calc(23px + 80px);
  179. }
  180. }
  181. &:nth-of-type(7) {
  182. width: calc(170px + 25px * 1);
  183. >.point {
  184. margin-right: calc(15px + 80px);
  185. }
  186. }
  187. &:nth-of-type(8) {
  188. width: 170px;
  189. >.point {
  190. margin-right: calc(17px + 80px);
  191. }
  192. }
  193. }
  194. }
  195. }
  196. }
  197. </style>