HotspotCompSmall.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <div class="hotspot animation-show-hide">
  3. <img
  4. class=""
  5. src="@/assets/images/icon_hotspot-small.png"
  6. alt=""
  7. draggable="false"
  8. >
  9. <div class="text">
  10. <slot />
  11. </div>
  12. </div>
  13. </template>
  14. <script setup>
  15. import { useDevicePixelRatio } from '@vueuse/core'
  16. const { pixelRatio } = useDevicePixelRatio()
  17. </script>
  18. <style lang="less" scoped>
  19. .hotspot{
  20. position: absolute;
  21. display: flex;
  22. flex-direction: column;
  23. align-items: center;
  24. cursor: pointer;
  25. >img{
  26. flex: 0 0 auto;
  27. width: calc(28px / v-bind('pixelRatio'));
  28. height: calc(28px / v-bind('pixelRatio'));
  29. }
  30. >.text{
  31. margin-top: -0.3em;
  32. writing-mode: vertical-lr;
  33. white-space: pre;
  34. font-family: KaiTi, KaiTi;
  35. font-weight: 400;
  36. font-size: calc(26px / v-bind('pixelRatio'));
  37. color: #FFFFFF;
  38. line-height: calc(30px / v-bind('pixelRatio'));
  39. text-shadow: 0px 0px calc(3px / v-bind('pixelRatio')) rgba(0,0,0,0.75);
  40. letter-spacing: 0.15em;
  41. }
  42. }
  43. </style>