HomeView.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. <template>
  2. <div
  3. class="home"
  4. @mousedown="onMouseDown"
  5. @mousemove="onMouseMove"
  6. @mouseup="onMouseUp"
  7. @mouseleave="onMouseLeave"
  8. @wheel.passive="onWheel"
  9. @dragstart.prevent
  10. >
  11. <div
  12. class="paper-wrap"
  13. :style="{
  14. left: paperPositionLeft,
  15. }"
  16. >
  17. <img
  18. v-for="index in 3"
  19. :key="index"
  20. class="paper"
  21. src="@/assets/background.jpg"
  22. alt=""
  23. @dragstart.prevent
  24. >
  25. </div>
  26. <div
  27. ref="landscape-wrap"
  28. class="landscape-wrap"
  29. :style="{
  30. left: landscapePositionLeft,
  31. }"
  32. >
  33. <img
  34. v-for="index in 3"
  35. :key="index"
  36. class="landscape"
  37. src="@/assets/landscape.png"
  38. alt=""
  39. @dragstart.prevent
  40. >
  41. </div>
  42. <div
  43. class="people-far-wrap"
  44. :style="{
  45. right: peopleFarPositionRight,
  46. }"
  47. >
  48. <img
  49. class="people-far"
  50. :class="peopleFarColorStatus"
  51. src="@/assets/people-far-serial-frame-400-600-60.png"
  52. alt=""
  53. @dragstart.prevent
  54. >
  55. <HotSpot
  56. v-if="[3].includes(tourState) || ([0].includes(tourState) && maskOpacity === 0)"
  57. class="hot-spot"
  58. @click="onClickPeopleFarHotSpot"
  59. />
  60. </div>
  61. <div
  62. class="people-near-wrap"
  63. :style="{
  64. left: peopleNearPositionLeft,
  65. }"
  66. >
  67. <img
  68. class="people-near"
  69. src="@/assets/people-near.png"
  70. alt=""
  71. @dragstart.prevent
  72. >
  73. <img
  74. v-show="[0, 1].includes(tourState)"
  75. ref="treasure"
  76. class="treasure"
  77. :style="{
  78. height: treasureInitialHeightPercent + '%',
  79. opacity: treasureOpacity,
  80. }"
  81. src="@/assets/treasure.png"
  82. alt=""
  83. @dragstart.prevent
  84. >
  85. </div>
  86. <img
  87. class="introduce"
  88. :style="{
  89. left: introducePositionLeft,
  90. }"
  91. src="@/assets/introduce.png"
  92. alt=""
  93. @dragstart.prevent
  94. >
  95. <div
  96. v-if="[0, 1, 2].includes(tourState) && maskOpacity !== 0"
  97. class="fade-mask"
  98. :style="{
  99. opacity: maskOpacity,
  100. }"
  101. >
  102. <img
  103. v-show="[2].includes(tourState)"
  104. src="@/assets/treasure-last-frame.jpg"
  105. alt=""
  106. >
  107. </div>
  108. <div
  109. v-show="[1].includes(tourState)"
  110. class="treasure-frames-wrap"
  111. >
  112. <img
  113. v-for="index of treasureFrameTotalNum"
  114. v-show="treasureFrameCurNum === index - 1 ||
  115. treasureFrameCurNum - 1 === index - 1
  116. "
  117. :key="index"
  118. class="treasure-frame"
  119. :src="require(`@/assets/treasure-frames/合成 1_${(index-1).toString().padStart(5, '0')}.jpg`)"
  120. alt=""
  121. @load="onTreasureFrameLoad(index - 1)"
  122. @error="onTreasureFrameError(index - 1)"
  123. >
  124. <div
  125. class="text1"
  126. :style="{opacity: text1Opacity}"
  127. >
  128. <span class="title">宋清瓷团花粉盒</span><br>
  129. <span>约公元前1220年<br>口径13.5cm 底径8cm 高6cm</span>
  130. </div>
  131. <div
  132. class="text2"
  133. :style="{opacity: text2Opacity}"
  134. >
  135. 此展品为宋代文物。子母口,浅腹,平底,盖面平;盒为子口,内有三个小碟;胎灰白,坚硬,施青色釉,口沿与底部无釉。现收藏于松阳县博物馆。
  136. </div>
  137. </div>
  138. </div>
  139. </template>
  140. <script>
  141. const initialPeopleNearPositionLeft = '25%'
  142. const initPeopleFarPositionRight = '15%'
  143. const landscapeSpeedRate = 0.02
  144. const peopleFarSpeedRate = 0.4
  145. const peopleNearSpeedRate = 0.6
  146. const introduceSpeedRate = 0.6
  147. const treasureFadeInProgressRightBorder = 3000
  148. const treasureDisplayProgressRightBorder = 6000
  149. const treasureFadeOutProgressRightBorder = 2000
  150. const translateLengthRightBorder = 9000
  151. const treasureFrameTotalNum = 125
  152. const treasureInitialHeightPercent = 9
  153. const treasureFinalHeightPercent = 116
  154. export default {
  155. name: 'HomeView',
  156. components: {
  157. },
  158. data() {
  159. return {
  160. // 鼠标拖拽相关
  161. isMouseDown: false,
  162. lastMoveEventTimeStamp: 0,
  163. moveSpeed: 0,
  164. // 动画帧相关
  165. lastAnimationTimeStamp: 0,
  166. animationFrameId: null,
  167. tourState: 0, // 0:文物淡入过渡阶段;1:文物三维展示阶段;2:文物渐出过渡阶段;3:镜头平移阶段
  168. // 镜头平移相关
  169. translateLength: 0,
  170. paperPositionLeft: 0,
  171. landscapePositionLeft: '18.491%',
  172. peopleFarPositionRight: initPeopleFarPositionRight,
  173. peopleNearPositionLeft: initialPeopleNearPositionLeft,
  174. introducePositionLeft: '3.347%',
  175. // 文物淡入相关
  176. treasureFadeInProgress: 0,
  177. treasureFadeInProgressRightBorder,
  178. treasureFadeInInitialLeft: 0,
  179. treasureFadeInInitialTop: 0,
  180. treasureFadeInFinalLeft: 0,
  181. treasureFadeInFinalTop: 0,
  182. treasureInitialHeightPercent,
  183. // 文物展示相关
  184. treasureDisplayProgress: 0,
  185. treasureFrameTotalNum,
  186. treasureFrameCurNum: 0,
  187. treasureFrameStateList: new Array(treasureFrameTotalNum),
  188. // 文物淡出相关
  189. treasureFadeOutProgress: 0,
  190. treasureFadeOutProgressRightBorder,
  191. // 远处人物变色相关
  192. peopleFarColorStatus: 'no-color', // 'no-color', 'color'
  193. isPeopleFarColorChanging: false,
  194. }
  195. },
  196. computed: {
  197. treasureOpacity() {
  198. if (this.tourState === 0) {
  199. if (this.treasureFadeInProgress > treasureFadeInProgressRightBorder / 2) {
  200. return 1
  201. } else {
  202. return this.treasureFadeInProgress / (treasureFadeInProgressRightBorder / 2)
  203. }
  204. } else if (this.tourState === 2) {
  205. if (this.treasureFadeOutProgress < treasureFadeOutProgressRightBorder / 2) {
  206. return 1
  207. } else {
  208. return 1 - (this.treasureFadeOutProgress - treasureFadeOutProgressRightBorder / 2) / (treasureFadeOutProgressRightBorder / 2)
  209. }
  210. } else {
  211. return 0
  212. }
  213. },
  214. maskOpacity() {
  215. if (this.tourState === 0) {
  216. if (this.treasureFadeInProgress > treasureFadeInProgressRightBorder / 2) {
  217. return 1
  218. } else {
  219. return this.treasureFadeInProgress / (treasureFadeInProgressRightBorder / 2)
  220. }
  221. } else if (this.tourState === 2) {
  222. if (this.treasureFadeOutProgress < treasureFadeOutProgressRightBorder / 2) {
  223. return 1
  224. } else {
  225. return 1 - (this.treasureFadeOutProgress - treasureFadeOutProgressRightBorder / 2) / (treasureFadeOutProgressRightBorder / 2)
  226. }
  227. } else {
  228. return 1
  229. }
  230. },
  231. text1Opacity() {
  232. if (this.tourState === 1) {
  233. if (this.treasureDisplayProgress < treasureDisplayProgressRightBorder * 0.1) {
  234. return this.treasureDisplayProgress / (treasureDisplayProgressRightBorder * 0.1)
  235. } else if (this.treasureDisplayProgress >= treasureDisplayProgressRightBorder * 0.1 && this.treasureDisplayProgress < treasureDisplayProgressRightBorder * 0.4) {
  236. return 1
  237. } else if (this.treasureDisplayProgress >= treasureDisplayProgressRightBorder * 0.4 && this.treasureDisplayProgress < treasureDisplayProgressRightBorder * 0.5) {
  238. return 1 - (this.treasureDisplayProgress - treasureDisplayProgressRightBorder * 0.4) / (treasureDisplayProgressRightBorder * (0.5 - 0.4))
  239. } else {
  240. return 0
  241. }
  242. } else {
  243. return 0
  244. }
  245. },
  246. text2Opacity() {
  247. if (this.tourState === 1) {
  248. if (this.treasureDisplayProgress < treasureDisplayProgressRightBorder * 0.5) {
  249. return 0
  250. } else if (this.treasureDisplayProgress >= treasureDisplayProgressRightBorder * 0.5 && this.treasureDisplayProgress < treasureDisplayProgressRightBorder * 0.6) {
  251. return (this.treasureDisplayProgress - treasureDisplayProgressRightBorder * 0.5) / (treasureDisplayProgressRightBorder * (0.6 - 0.5))
  252. } else if (this.treasureDisplayProgress >= treasureDisplayProgressRightBorder * 0.6 && this.treasureDisplayProgress < treasureDisplayProgressRightBorder * 0.9) {
  253. return 1
  254. } else {
  255. return 1 - (this.treasureDisplayProgress - treasureDisplayProgressRightBorder * 0.9) / (treasureDisplayProgressRightBorder * (1 - 0.9))
  256. }
  257. } else {
  258. return 0
  259. }
  260. },
  261. },
  262. watch: {
  263. tourState(vNew, vOld) {
  264. if (vOld === 0 && vNew === 1) {
  265. this.treasureDisplayProgress += 0.001
  266. } else if (vOld === 1 && vNew === 2) {
  267. this.treasureFadeOutProgress += 0.001
  268. } else if (vOld === 2 && vNew === 3) {
  269. this.translateLength -= 0.001
  270. } else if (vOld === 3 && vNew === 2) {
  271. this.treasureFadeOutProgress -= 0.001
  272. } else if (vOld === 2 && vNew === 1) {
  273. this.treasureDisplayProgress -= 0.001
  274. } else if (vOld === 1 && vNew === 0) {
  275. this.treasureFadeInProgress -= 0.001
  276. }
  277. },
  278. treasureFadeInProgress: {
  279. handler(vNew, vOld) {
  280. if (vOld < this.treasureFadeInProgressRightBorder && vNew >= this.treasureFadeInProgressRightBorder && this.tourState === 0) {
  281. this.tourState = 1
  282. }
  283. if (this.treasureFadeInProgress > treasureFadeInProgressRightBorder / 2) {
  284. this.$refs.treasure.style.left = this.treasureFadeInInitialLeft + (this.treasureFadeInProgress - treasureFadeInProgressRightBorder / 2) / (treasureFadeInProgressRightBorder / 2) * (this.treasureFadeInFinalLeft - this.treasureFadeInInitialLeft) + 'px'
  285. this.$refs.treasure.style.top = this.treasureFadeInInitialTop + (this.treasureFadeInProgress - treasureFadeInProgressRightBorder / 2) / (treasureFadeInProgressRightBorder / 2) * (this.treasureFadeInFinalTop - this.treasureFadeInInitialTop) + 'px'
  286. this.$refs.treasure.style.transform = `translate(-50%, -50%) scale(${1 + (this.treasureFadeInProgress - treasureFadeInProgressRightBorder / 2) / (treasureFadeInProgressRightBorder / 2) * (treasureFinalHeightPercent / this.treasureInitialHeightPercent - 1)})`
  287. } else {
  288. this.$refs.treasure.style.left = this.treasureFadeInInitialLeft + 'px'
  289. this.$refs.treasure.style.top = this.treasureFadeInInitialTop + 'px'
  290. this.$refs.treasure.style.transform = `translate(-50%, -50%) scale(1)`
  291. }
  292. }
  293. },
  294. treasureDisplayProgress: {
  295. handler(vNew, vOld) {
  296. // 更新toureState
  297. if (vOld > 0 && vNew <= 0 && this.tourState === 1) {
  298. this.tourState = 0
  299. } else if (vOld < treasureDisplayProgressRightBorder && vNew >= treasureDisplayProgressRightBorder && this.tourState === 1) {
  300. this.tourState = 2
  301. }
  302. let idealCurNum = Math.round(this.treasureDisplayProgress / treasureDisplayProgressRightBorder * treasureFrameTotalNum)
  303. while (this.treasureFrameStateList[idealCurNum] === false) {
  304. idealCurNum--
  305. }
  306. this.treasureFrameCurNum = idealCurNum
  307. }
  308. },
  309. treasureFadeOutProgress: {
  310. handler(vNew, vOld) {
  311. if (vOld > 0 && vNew <= 0 && this.tourState === 2) {
  312. this.tourState = 1
  313. } else if (vOld < this.treasureFadeOutProgressRightBorder && vNew >= this.treasureFadeOutProgressRightBorder && this.tourState === 2) {
  314. this.tourState = 3
  315. }
  316. }
  317. },
  318. translateLength: {
  319. handler(vNew, vOld) {
  320. // const rightBorder = window.innerWidth * 2
  321. if (vOld < 0 && vNew >= 0 && this.tourState === 3) {
  322. this.tourState = 2
  323. }
  324. // if (vOld > -rightBorder && vNew <= -rightBorder && this.tourState === 3) {
  325. // this.tourState = 1
  326. // }
  327. this.paperPositionLeft = `${vNew * landscapeSpeedRate}px`
  328. this.landscapePositionLeft = `calc(18.491% + ${vNew * landscapeSpeedRate}px)`
  329. this.peopleFarPositionRight = `calc(${initPeopleFarPositionRight} - ${vNew * peopleFarSpeedRate}px)`
  330. this.peopleNearPositionLeft = `calc(${initialPeopleNearPositionLeft} + ${vNew * peopleNearSpeedRate}px)`
  331. this.introducePositionLeft = `calc(3.347% + ${vNew * introduceSpeedRate}px)`
  332. }
  333. },
  334. },
  335. mounted() {
  336. this.animationFrameId = requestAnimationFrame(this.inertanceEffect)
  337. setTimeout(() => {
  338. this.treasureFadeInInitialLeft = this.$refs.treasure.offsetLeft
  339. this.treasureFadeInInitialTop = this.$refs.treasure.offsetTop
  340. this.treasureFadeInFinalLeft = window.innerWidth / 2 - this.$refs.treasure.offsetParent.offsetLeft
  341. this.treasureFadeInFinalTop = window.innerHeight / 2 - this.$refs.treasure.offsetParent.offsetTop
  342. }, 100)
  343. },
  344. unmounted() {
  345. cancelAnimationFrame(this.animationFrameId)
  346. },
  347. methods: {
  348. onMouseDown(e) {
  349. this.isMouseDown = true
  350. this.moveSpeed = 0
  351. this.lastMoveEventTimeStamp = 0
  352. this.lastAnimationTimeStamp = Date.now()
  353. },
  354. onMouseUp(e) {
  355. this.isMouseDown = false
  356. },
  357. onMouseLeave() {
  358. this.isMouseDown = false
  359. },
  360. onMouseMove(e) {
  361. if (this.isMouseDown) {
  362. if (this.lastMoveEventTimeStamp) {
  363. // 更新speed
  364. const currentMoveSpeed = e.movementX / (e.timeStamp - this.lastMoveEventTimeStamp)
  365. this.moveSpeed = this.moveSpeed * 0.9 + currentMoveSpeed * 0.1
  366. }
  367. this.lastMoveEventTimeStamp = e.timeStamp
  368. }
  369. },
  370. onWheel(e) {
  371. if (this.tourState === 0) {
  372. this.treasureFadeInProgress += e.deltaY
  373. if (this.treasureFadeInProgress < 0) {
  374. this.treasureFadeInProgress = 0
  375. this.moveSpeed = 0
  376. } else if (this.treasureFadeInProgress > this.treasureFadeInProgressRightBorder) {
  377. this.treasureFadeInProgress = this.treasureFadeInProgressRightBorder
  378. }
  379. } else if (this.tourState === 1) {
  380. this.treasureDisplayProgress += e.deltaY
  381. if (this.treasureDisplayProgress < 0) {
  382. this.treasureDisplayProgress = 0
  383. } else if (this.treasureDisplayProgress > treasureDisplayProgressRightBorder) {
  384. this.treasureDisplayProgress = treasureDisplayProgressRightBorder
  385. }
  386. } else if (this.tourState === 2) {
  387. this.treasureFadeOutProgress += e.deltaY
  388. if (this.treasureFadeOutProgress < 0) {
  389. this.treasureFadeOutProgress = 0
  390. } else if (this.treasureFadeOutProgress > this.treasureFadeOutProgressRightBorder) {
  391. this.treasureFadeOutProgress = this.treasureFadeOutProgressRightBorder
  392. }
  393. } else if (this.tourState === 3) {
  394. this.translateLength -= e.deltaY
  395. if (this.translateLength > 0) {
  396. this.translateLength = 0
  397. } else if (this.translateLength < -translateLengthRightBorder) {
  398. this.translateLength = -translateLengthRightBorder
  399. this.moveSpeed = 0
  400. }
  401. }
  402. },
  403. inertanceEffect() {
  404. const timeStamp = Date.now()
  405. const timeElapsed = timeStamp - this.lastAnimationTimeStamp
  406. // 速度减慢
  407. if (this.moveSpeed > 0) {
  408. this.moveSpeed -= 0.003 * timeElapsed
  409. if (this.moveSpeed < 0) {
  410. this.moveSpeed = 0
  411. }
  412. } else if (this.moveSpeed < 0) {
  413. this.moveSpeed += 0.003 * timeElapsed
  414. if (this.moveSpeed > 0) {
  415. this.moveSpeed = 0
  416. }
  417. }
  418. // 根据速度更新“距离”
  419. if (this.tourState === 0) {
  420. this.treasureFadeInProgress -= this.moveSpeed * timeElapsed
  421. if (this.treasureFadeInProgress < 0) {
  422. this.treasureFadeInProgress = 0
  423. this.moveSpeed = 0
  424. } else if (this.treasureFadeInProgress > this.treasureFadeInProgressRightBorder) {
  425. this.treasureFadeInProgress = this.treasureFadeInProgressRightBorder
  426. }
  427. } else if (this.tourState === 1) {
  428. this.treasureDisplayProgress -= this.moveSpeed * timeElapsed
  429. if (this.treasureDisplayProgress < 0) {
  430. this.treasureDisplayProgress = 0
  431. } else if (this.treasureDisplayProgress > treasureDisplayProgressRightBorder) {
  432. this.treasureDisplayProgress = treasureDisplayProgressRightBorder
  433. }
  434. } else if (this.tourState === 2) {
  435. this.treasureFadeOutProgress -= this.moveSpeed * timeElapsed
  436. if (this.treasureFadeOutProgress < 0) {
  437. this.treasureFadeOutProgress = 0
  438. } else if (this.treasureFadeOutProgress > this.treasureFadeOutProgressRightBorder) {
  439. this.treasureFadeOutProgress = this.treasureFadeOutProgressRightBorder
  440. }
  441. } else if (this.tourState === 3) {
  442. this.translateLength += this.moveSpeed * timeElapsed
  443. if (this.translateLength > 0) {
  444. this.translateLength = 0
  445. } else if (this.translateLength < -translateLengthRightBorder) {
  446. this.translateLength = -translateLengthRightBorder
  447. this.moveSpeed = 0
  448. }
  449. }
  450. this.lastAnimationTimeStamp = timeStamp
  451. this.animationFrameId = requestAnimationFrame(this.inertanceEffect)
  452. },
  453. onClickPeopleFarHotSpot() {
  454. if (this.isPeopleFarColorChanging) {
  455. return
  456. } else {
  457. if (this.peopleFarColorStatus === 'no-color') {
  458. this.peopleFarColorStatus = 'color'
  459. } else {
  460. this.peopleFarColorStatus = 'no-color'
  461. }
  462. this.isPeopleFarColorChanging = true
  463. setTimeout(() => {
  464. this.isPeopleFarColorChanging = false
  465. }, 2500)
  466. }
  467. },
  468. onTreasureFrameLoad(idx) {
  469. this.treasureFrameStateList[idx] = true
  470. },
  471. onTreasureFrameError(idx) {
  472. this.treasureFrameStateList[idx] = false
  473. },
  474. }
  475. }
  476. </script>
  477. <style lang="less" scoped>
  478. .home {
  479. width: 100%;
  480. height: 100%;
  481. position: relative;
  482. overflow: hidden;
  483. .paper-wrap {
  484. position: absolute;
  485. top: 0;
  486. height: 100%;
  487. display: flex;
  488. > .paper {
  489. height: 100%;
  490. }
  491. }
  492. .landscape-wrap {
  493. position: absolute;
  494. height: 30%;
  495. top: 0;
  496. display: flex;
  497. > .landscape {
  498. height: 100%;
  499. }
  500. }
  501. > .people-far-wrap {
  502. position: absolute;
  503. top: 15%;
  504. height: 750px;
  505. width: 500px;
  506. overflow: hidden;
  507. > .people-far {
  508. position: absolute;
  509. height: 100%;
  510. transition-property: left;
  511. transition-duration: 2.5s;
  512. transition-timing-function: steps(59, jump-end);
  513. &.no-color {
  514. left: 0;
  515. }
  516. &.color {
  517. left: calc(-100% * 59)
  518. }
  519. }
  520. > .hot-spot {
  521. position: absolute;
  522. left: 52%;
  523. transform: translateX(-50%);
  524. top: 17%;
  525. }
  526. }
  527. > .people-near-wrap {
  528. position: absolute;
  529. bottom: -13%;
  530. height: 100vh;
  531. > .people-near {
  532. height: 100%;
  533. }
  534. > .treasure {
  535. position: absolute;
  536. left: 49%;
  537. top: 32.5%;
  538. z-index: 2;
  539. transform: translate(-50%, -50%);
  540. }
  541. }
  542. .introduce {
  543. position: absolute;
  544. top: 5%;
  545. width: 13.727%;
  546. }
  547. .fade-mask {
  548. position: absolute;
  549. top: 0;
  550. bottom: 0;
  551. left: 0;
  552. right: 0;
  553. background-color: #bfbfa7;
  554. z-index: 1;
  555. img {
  556. width: 100%;
  557. height: 100%;
  558. object-fit: cover;
  559. }
  560. }
  561. .treasure-frames-wrap {
  562. position: absolute;
  563. top: 0;
  564. left: 0;
  565. width: 100%;
  566. height: 100%;
  567. z-index: 3;
  568. > img {
  569. width: 100%;
  570. height: 100%;
  571. object-fit: cover;
  572. }
  573. > .text1 {
  574. color: #fff;
  575. position: absolute;
  576. top: 5%;
  577. left: 3%;
  578. .title {
  579. font-size: 24px;
  580. font-weight: bold;
  581. line-height: 2;
  582. }
  583. span {
  584. font-size: 18px;
  585. line-height: 1.5;
  586. }
  587. }
  588. > .text2 {
  589. color: #fff;
  590. position: absolute;
  591. bottom: 5%;
  592. right: 3%;
  593. width: 30%;
  594. font-size: 18px;
  595. line-height: 1.5;
  596. }
  597. }
  598. @media screen and (max-height: 810px) {
  599. .people-far-wrap {
  600. height: 600px;
  601. width: 400px;
  602. }
  603. }
  604. @media screen and (max-height: 720px) {
  605. .people-far-wrap {
  606. height: 540px;
  607. width: 360px;
  608. }
  609. }
  610. @media screen and (max-height: 630px) {
  611. .people-far-wrap {
  612. height: 480px;
  613. width: 320px;
  614. }
  615. }
  616. @media screen and (max-height: 540px) {
  617. .people-far-wrap {
  618. height: 420px;
  619. width: 280px;
  620. }
  621. }
  622. }
  623. </style>