useParallax
useParallax
簡単にパララックス効果を作成します。useDeviceOrientation を使用し、オリエンテーションがサポートされていない場合は useMouse にフォールバックします。
使用法
<script setup lang="ts">
import { useParallax } from '@vueuse/core'
const container = ref(null)
const { tilt, roll, source } = useParallax(container)
</script>
<template>
<div ref="container" />
</template>
© 2019–PRESENT Anthony Fu https://github.com/antfu
※このページは Nuxt.js 公式ドキュメントの翻訳ページです。
公式ドキュメントの該当ページはこちら:
#