index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  1. <template>
  2. <div style="height: 100%">
  3. <div
  4. v-if="hotVisible"
  5. class="bamboo-hot2-hot"
  6. >
  7. <div class="bamboo-hot2-hot__title">
  8. {{ ITEM_INFO_MAP[checkedHotId].label }}
  9. </div>
  10. <div
  11. class="bamboo-hot2-hot__inner"
  12. v-html="ITEM_INFO_MAP[checkedHotId].info"
  13. />
  14. </div>
  15. <div
  16. ref="bambooWrap"
  17. class="bamboo-hot2"
  18. :class="{
  19. 'wrap-hide': hotVisible
  20. }"
  21. @touchstart="handleTouchstart"
  22. @touchmove="handleTouchmove"
  23. @touchend="handleTouchend"
  24. >
  25. <div
  26. class="bamboo-hot2-b1"
  27. :class="{
  28. hide: hotVisible && checkedHotId !== 1
  29. }"
  30. >
  31. <img src="./images/bamboo1.png">
  32. <div
  33. class="bamboo-hot2__hot"
  34. :class="{
  35. hide: hotVisible
  36. }"
  37. @click="handleHot(1)"
  38. >
  39. <p>水竹</p>
  40. </div>
  41. </div>
  42. <div
  43. class="bamboo-hot2-b2"
  44. :class="{
  45. hide: hotVisible && checkedHotId !== 2
  46. }"
  47. >
  48. <img
  49. src="./images/bamboo2.png"
  50. @load="handleBambooOffset(2)"
  51. >
  52. </div>
  53. <div
  54. class="bamboo-hot2__hot b2"
  55. :class="{
  56. hide: hotVisible
  57. }"
  58. @click="handleHot(2)"
  59. >
  60. <p>紫竹</p>
  61. </div>
  62. <div
  63. class="bamboo-hot2-b3"
  64. :class="{
  65. hide: hotVisible && checkedHotId !== 3
  66. }"
  67. >
  68. <img
  69. src="./images/bamboo3.png"
  70. @load="handleBambooOffset(3)"
  71. >
  72. <div
  73. class="bamboo-hot2__hot"
  74. :class="{
  75. hide: hotVisible
  76. }"
  77. @click="handleHot(3)"
  78. >
  79. <p>梅鹿竹</p>
  80. </div>
  81. </div>
  82. <div
  83. class="bamboo-hot2-b4"
  84. :class="{
  85. hide: hotVisible && checkedHotId !== 4
  86. }"
  87. >
  88. <img
  89. src="./images/bamboo4.png"
  90. @load="handleBambooOffset(4)"
  91. >
  92. <div
  93. class="bamboo-hot2__hot"
  94. :class="{
  95. hide: hotVisible
  96. }"
  97. @click="handleHot(4)"
  98. >
  99. <p>楠竹</p>
  100. </div>
  101. </div>
  102. <div
  103. class="bamboo-hot2-b5"
  104. :class="{
  105. hide: hotVisible
  106. }"
  107. >
  108. <img src="./images/bamboo5.png">
  109. </div>
  110. <div
  111. class="bamboo-hot2-b6"
  112. :class="{
  113. hide: hotVisible
  114. }"
  115. >
  116. <img src="./images/bamboo6.png">
  117. </div>
  118. <div
  119. class="bamboo-hot2-b7"
  120. :class="{
  121. hide: hotVisible
  122. }"
  123. >
  124. <img src="./images/bamboo7.png">
  125. </div>
  126. <div
  127. class="bamboo-hot2-b8"
  128. :class="{
  129. hide: hotVisible && checkedHotId !== 8
  130. }"
  131. >
  132. <img
  133. src="./images/bamboo8.png"
  134. @load="handleBambooOffset(8)"
  135. >
  136. <div
  137. class="bamboo-hot2__hot"
  138. :class="{
  139. hide: hotVisible
  140. }"
  141. @click="handleHot(8)"
  142. >
  143. <p>单竹</p>
  144. </div>
  145. </div>
  146. <div
  147. class="bamboo-hot2-b9"
  148. :class="{
  149. hide: hotVisible
  150. }"
  151. >
  152. <img src="./images/bamboo9.png">
  153. </div>
  154. <div
  155. class="bamboo-hot2-b10"
  156. :class="{
  157. hide: hotVisible
  158. }"
  159. >
  160. <img src="./images/bamboo10.png">
  161. </div>
  162. <div
  163. class="bamboo-hot2-b11"
  164. :class="{
  165. hide: hotVisible
  166. }"
  167. >
  168. <img src="./images/bamboo11.png">
  169. </div>
  170. <div
  171. class="bamboo-hot2-b12"
  172. :class="{
  173. hide: hotVisible
  174. }"
  175. >
  176. <img src="./images/bamboo12.png">
  177. </div>
  178. <div
  179. class="bamboo-hot2-b13"
  180. :class="{
  181. hide: hotVisible
  182. }"
  183. >
  184. <img src="./images/bamboo13.png">
  185. </div>
  186. <div
  187. class="bamboo-hot2-b14"
  188. :class="{
  189. hide: hotVisible
  190. }"
  191. >
  192. <img src="./images/bamboo14.png">
  193. </div>
  194. <div
  195. ref="bambooWrapBg"
  196. class="bamboo-hot2-bg-wrap"
  197. >
  198. <img
  199. v-if="bgImgLoaded"
  200. class="bamboo-hot2__grass"
  201. :class="{
  202. hide: hotVisible
  203. }"
  204. src="./images/grass.png"
  205. >
  206. <img
  207. class="bamboo-hot2__bg"
  208. src="./images/bg.png"
  209. :style="{
  210. filter: hotVisible ? 'saturate(1.3) brightness(0.95)' : 'none'
  211. }"
  212. @load="bgImgLoaded = true"
  213. >
  214. </div>
  215. </div>
  216. <div class="system-btns">
  217. <BtnBack @click="goBack" />
  218. <OperationTip
  219. id="operationH"
  220. class="operation-h"
  221. text=""
  222. direction="h"
  223. />
  224. </div>
  225. </div>
  226. </template>
  227. <script setup>
  228. import { ref, watch, onBeforeUnmount } from 'vue'
  229. import { useRouter } from 'vue-router'
  230. import useSizeAdapt from "@/useFunctions/useSizeAdapt"
  231. let itemScrollMap = {
  232. 1: 0,
  233. 2: 166,
  234. 3: 201,
  235. 4: 450,
  236. 8: 1048
  237. }
  238. const ITEM_INFO_MAP = {
  239. 1: {
  240. label: '水竹',
  241. info: `
  242. <p>篷耳小,形状为卵形或长椭圆形。</p>
  243. <p>锋舌边缘生有短白纤毛。</p>
  244. <p>筝片直立,呈三角形至狭长三角形。</p>
  245. `
  246. },
  247. 2: {
  248. label: '紫竹',
  249. info: `
  250. <p>紫竹幼竿绿色,覆盖细柔毛和白粉,</p>
  251. <p>幕环有毛,籍鞘背面红褐色或绿色加深。</p>
  252. <p>叶片小而薄,窄披针形。</p>
  253. `
  254. },
  255. 3: {
  256. label: '梅鹿竹',
  257. info: `
  258. <p>梅鹿竹斑纹相连,圆形,</p>
  259. <p>外轮廓深色,斑心发白。</p>
  260. <p>竹地上有兽斑状斑痕,酷似梅花鹿的花纹。</p>
  261. `
  262. },
  263. 4: {
  264. label: '楠竹',
  265. info: `
  266. <p>单轴散生型常绿乔木状竹类植物,</p>
  267. <p>呈直立状,</p>
  268. <p>竹叶深绿,</p>
  269. <p>呈披针形</p>
  270. `
  271. },
  272. 8: {
  273. label: '单竹',
  274. info: `
  275. <p>竹质细腻,纤维韧性极强,</p>
  276. <p>可制成薄如蝉翼的竹篾丝,</p>
  277. <p>编织成绸似、绢似的精美竹编工艺品。</p>
  278. `
  279. },
  280. }
  281. const bgImgLoaded = ref(false)
  282. const {
  283. windowSizeInCssForRef,
  284. windowSizeWhenDesignForRef,
  285. } = useSizeAdapt()
  286. const router = useRouter()
  287. const bambooWrap = ref()
  288. const bambooWrapBg = ref()
  289. const hotVisible = ref(false)
  290. const checkedHotId = ref(0)
  291. const handleHot = (id) => {
  292. checkedHotId.value = id
  293. hotVisible.value = true
  294. cancelAnimationFrame(animationFrameId.value)
  295. bambooWrap.value.scrollTo({
  296. left: itemScrollMap[id],
  297. behavior: 'smooth'
  298. })
  299. translateX.value = itemScrollMap[id]
  300. }
  301. const handleBambooOffset = (target) => {
  302. const offset = window.innerWidth / 6
  303. const left = document.getElementsByClassName(`bamboo-hot2-b${target}`)?.[0].getBoundingClientRect().left
  304. let temp = 0
  305. switch (target) {
  306. case 3:
  307. temp = window.innerWidth / 3
  308. break
  309. case 4:
  310. temp = -(window.innerWidth * 0.25)
  311. break
  312. case 8:
  313. temp = -(window.innerWidth * 0.7)
  314. break
  315. }
  316. itemScrollMap[target] = left - offset + temp
  317. }
  318. // 动画帧相关
  319. const lastAnimationTimeStamp = ref(0)
  320. const animationFrameId = ref(0)
  321. const moveSpeed = ref(0)
  322. const translateX = ref(0)
  323. const maxTranslateXLength = ref(0)
  324. const lastMoveEventTimeStamp = ref(0)
  325. const isMouseDown = ref(false)
  326. const isMove = ref(false)
  327. const lastTouchPos = ref(0)
  328. watch([bambooWrapBg, bgImgLoaded], () => {
  329. if (!bgImgLoaded.value) return
  330. maxTranslateXLength.value = bambooWrapBg.value ? bambooWrapBg.value.scrollWidth - window.innerWidth : 0
  331. animationFrameId.value = requestAnimationFrame(animationFrameTask)
  332. })
  333. const animationFrameTask = () => {
  334. const timeStamp = Date.now()
  335. const timeElapsed = timeStamp - lastAnimationTimeStamp.value
  336. // 速度减慢
  337. if (moveSpeed.value > 0) {
  338. moveSpeed.value -= 0.003 * timeElapsed
  339. if (moveSpeed.value < 0) {
  340. moveSpeed.value = 0
  341. }
  342. } else if (moveSpeed.value < 0) {
  343. moveSpeed.value += 0.003 * timeElapsed
  344. if (moveSpeed.value > 0) {
  345. moveSpeed.value = 0
  346. }
  347. }
  348. // 根据速度更新距离
  349. translateX.value += moveSpeed.value * timeElapsed
  350. if (translateX.value < 0) {
  351. translateX.value = 0
  352. } else if (translateX.value > maxTranslateXLength.value) {
  353. translateX.value = maxTranslateXLength.value
  354. moveSpeed.value = 0
  355. }
  356. bambooWrap.value?.scrollTo({
  357. left: translateX.value,
  358. behavior: 'instant'
  359. })
  360. lastAnimationTimeStamp.value = timeStamp
  361. animationFrameId.value = requestAnimationFrame(animationFrameTask)
  362. }
  363. const handleTouchstart = (e) => {
  364. if (hotVisible.value) return
  365. isMouseDown.value = true
  366. moveSpeed.value = 0
  367. lastMoveEventTimeStamp.value = 0
  368. lastAnimationTimeStamp.value = Date.now()
  369. lastTouchPos.value = e.changedTouches[0].clientX
  370. }
  371. const handleTouchmove = (e) => {
  372. e.preventDefault()
  373. if (hotVisible.value || !isMouseDown.value || !e.changedTouches.length) return
  374. if (
  375. lastMoveEventTimeStamp.value &&
  376. e.timeStamp - lastMoveEventTimeStamp.value > 1
  377. ) {
  378. // 更新speed
  379. isMove.value = true
  380. const currentMoveSpeed =
  381. (-(e.changedTouches[0].clientX - lastTouchPos.value) /
  382. (e.timeStamp - lastMoveEventTimeStamp.value)) *
  383. 1.5
  384. moveSpeed.value = moveSpeed.value * 0.9 + currentMoveSpeed * 0.1
  385. lastTouchPos.value = e.changedTouches[0].clientX
  386. }
  387. lastMoveEventTimeStamp.value = e.timeStamp
  388. }
  389. const handleTouchend = () => {
  390. if (hotVisible.value) return
  391. isMouseDown.value = false
  392. setTimeout(() => {
  393. isMove.value = false
  394. })
  395. }
  396. const goBack = () => {
  397. if (hotVisible.value) {
  398. hotVisible.value = false
  399. checkedHotId.value = 0
  400. animationFrameId.value = requestAnimationFrame(animationFrameTask)
  401. return
  402. }
  403. router.push({
  404. name: 'MoreContent',
  405. query: {
  406. anchorIdx: 0,
  407. }
  408. })
  409. }
  410. onBeforeUnmount(() => {
  411. cancelAnimationFrame(animationFrameId.value)
  412. })
  413. </script>
  414. <style lang="less" scoped>
  415. ::-webkit-scrollbar {
  416. display: none;
  417. }
  418. img {
  419. pointer-events: none;
  420. }
  421. .hide {
  422. opacity: 0 !important;
  423. animation: none !important;
  424. }
  425. [class^="bamboo-hot2-b"] {
  426. position: absolute;
  427. top: 0;
  428. height: 100%;
  429. z-index: 3;
  430. img {
  431. height: 100%;
  432. }
  433. }
  434. .bamboo-hot2-hot {
  435. display: flex;
  436. position: fixed;
  437. top: 50%;
  438. right: calc(70 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  439. transform: translateY(-50%);
  440. color: white;
  441. font-family: KaiTi;
  442. writing-mode: vertical-rl;
  443. white-space: nowrap;
  444. z-index: 999;
  445. &__title {
  446. position: relative;
  447. margin-bottom: calc(90 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  448. font-weight: bold;
  449. letter-spacing: 5px;
  450. font-size: calc(38 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  451. &::before {
  452. content: '';
  453. position: absolute;
  454. top: calc(-2 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  455. right: calc(25 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  456. width: calc(15 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  457. height: calc(15 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  458. border-radius: 50%;
  459. border: 1px solid #F8DD86;
  460. z-index: -1;
  461. }
  462. }
  463. &__inner {
  464. letter-spacing: 3px;
  465. line-height: calc(40 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  466. font-size: calc(20 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  467. }
  468. }
  469. .bamboo-hot2 {
  470. position: relative;
  471. width: 100%;
  472. height: 100%;
  473. perspective: calc(100 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  474. transform-style: preserve-3d;
  475. overflow-x: auto;
  476. > * {
  477. opacity: 1;
  478. transition: all linear .2s;
  479. }
  480. &__hot {
  481. display: flex;
  482. align-items: center;
  483. justify-content: center;
  484. position: absolute;
  485. color: white;
  486. font-size: 12px;
  487. font-family: KaiTi;
  488. writing-mode: vertical-rl;
  489. animation: breathing linear 2s infinite;
  490. &::before {
  491. content: '';
  492. display: block;
  493. margin-bottom: calc(5 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  494. width: 20px;
  495. height: 20px;
  496. background: url('./images/hot.png') no-repeat center / contain;
  497. }
  498. }
  499. &-b1 {
  500. left: calc(50 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  501. transform: translateZ(calc(20 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'))) scale(0.8);
  502. .bamboo-hot2__hot {
  503. top: calc(340 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  504. right: calc(40 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  505. }
  506. }
  507. &-b2 {
  508. left: calc(250 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  509. transform: translateZ(calc(10 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef')));
  510. z-index: 2;
  511. }
  512. .bamboo-hot2__hot.b2 {
  513. top: calc(200 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  514. left: calc(305 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  515. transform: translateZ(calc(10 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef')));
  516. z-index: 4;
  517. }
  518. &-b3 {
  519. left: calc(140 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  520. transform: translateZ(calc(20 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'))) scale(0.8);
  521. .bamboo-hot2__hot {
  522. top: calc(300 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  523. right: calc(110 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  524. }
  525. }
  526. &-b4 {
  527. left: calc(600 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  528. transform: translateZ(calc(15 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'))) scale(0.85);
  529. .bamboo-hot2__hot {
  530. top: calc(220 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  531. right: calc(14 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  532. }
  533. }
  534. &-b5 {
  535. left: calc(1050 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  536. transform: translateZ(calc(20 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'))) scale(0.8);
  537. }
  538. &-b6 {
  539. left: calc(1170 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  540. transform: translateZ(calc(15 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef')));
  541. }
  542. &-b7 {
  543. left: calc(1050 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  544. transform: translateZ(calc(10 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef')));
  545. z-index: 2;
  546. }
  547. &-b8 {
  548. left: calc(1180 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  549. transform: translateZ(calc(25 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'))) scale(0.8);
  550. .bamboo-hot2__hot {
  551. top: calc(320 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  552. right: calc(110 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  553. }
  554. }
  555. &-b9 {
  556. left: calc(1480 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  557. transform: translateZ(calc(20 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'))) scale(0.82);
  558. }
  559. &-b10 {
  560. left: calc(1810 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  561. transform: translateZ(calc(10 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef')));
  562. }
  563. &-b11 {
  564. left: calc(1790 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  565. transform: translateZ(calc(5 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef')));
  566. z-index: 2;
  567. }
  568. &-b12 {
  569. left: calc(1600 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  570. transform: translateZ(calc(15 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef')));
  571. z-index: 2;
  572. }
  573. &-b13 {
  574. left: calc(2050 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  575. transform: translateZ(calc(15 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef')));
  576. z-index: 2;
  577. }
  578. &-b14 {
  579. left: calc(2220 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  580. transform: translateZ(calc(30 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'))) scale(0.7);
  581. }
  582. &.wrap-hide {
  583. &::before,
  584. &::after {
  585. opacity: 0;
  586. }
  587. }
  588. &::before {
  589. content: '';
  590. position: absolute;
  591. top: 0;
  592. left: 0;
  593. width: calc(457 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  594. height: calc(330 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  595. background: url('./images/leaf.png') no-repeat center / contain;
  596. opacity: 1;
  597. transition: opacity linear .2s;
  598. z-index: 3;
  599. }
  600. &::after {
  601. content: '';
  602. position: absolute;
  603. top: 0;
  604. left: calc(1600 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  605. width: calc(689 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  606. height: calc(276 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  607. background: url('./images/leaf2.png') no-repeat center / contain;
  608. opacity: 1;
  609. transition: opacity linear .2s;
  610. z-index: 3;
  611. }
  612. &-bg-wrap {
  613. width: fit-content;
  614. height: 100%;
  615. position: relative;
  616. z-index: 1;
  617. }
  618. &__grass {
  619. position: absolute;
  620. left: 0;
  621. bottom: 0;
  622. width: 100%;
  623. z-index: 1;
  624. }
  625. &__bg {
  626. height: 100%;
  627. }
  628. }
  629. .system-btns {
  630. width: 100%;
  631. padding: 0 calc(20 / v-bind(windowSizeWhenDesignForRef) * v-bind(windowSizeInCssForRef));
  632. display: flex;
  633. // flex-direction: column;
  634. justify-content: flex-end;
  635. position: absolute;
  636. bottom: calc(60 /v-bind(windowSizeWhenDesignForRef) * v-bind(windowSizeInCssForRef));
  637. z-index: 2;
  638. .operation-h {
  639. width: calc(36 /v-bind('windowSizeWhenDesignForRef')* v-bind('windowSizeInCssForRef'));
  640. transition: opacity 0.5s ease-in-out;
  641. }
  642. }
  643. @keyframes breathing {
  644. 0% {
  645. opacity: 1;
  646. }
  647. 50% {
  648. opacity: 0.3;
  649. }
  650. 100% {
  651. opacity: 1;
  652. }
  653. }
  654. </style>