HotspotForHomepage.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <div class="hotspot animation-show-hide-for-home-hotspot">
  3. <img
  4. class=""
  5. src="@/assets/images/icon_hotspot.png"
  6. alt=""
  7. draggable="false"
  8. >
  9. </div>
  10. </template>
  11. <script setup>
  12. import { ref, computed, watch, onMounted, inject } from "vue"
  13. import { useRoute, useRouter } from "vue-router"
  14. import { useStore } from "vuex"
  15. import useSizeAdapt from "@/useFunctions/useSizeAdapt"
  16. const {
  17. windowSizeInCssForRef,
  18. windowSizeWhenDesignForRef,
  19. } = useSizeAdapt()
  20. const route = useRoute()
  21. const router = useRouter()
  22. const store = useStore()
  23. const $env = inject('$env')
  24. </script>
  25. <style lang="less" scoped>
  26. .hotspot{
  27. width: calc(33 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  28. height: calc(33 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  29. >img{
  30. width: 100%;
  31. height: 100%;
  32. }
  33. }
  34. .animation-show-hide-for-home-hotspot {
  35. animation: show-hide 2.5s infinite;
  36. }
  37. @keyframes show-hide {
  38. 0% {
  39. opacity: 0;
  40. }
  41. 50% {
  42. opacity: 1;
  43. }
  44. 100% {
  45. opacity: 0;
  46. }
  47. }
  48. </style>