vue视差滚动_Vue.js易于使用的鼠标视差组件

这篇博客介绍了如何使用Vue.js创建一个简单的鼠标视差滚动组件。内容包括组件的用法、可配置的属性以及构建设置。
摘要由CSDN通过智能技术生成

vue视差滚动

vuejs-鼠标视差 (vuejs-mouse-parallax)

An easy to use Mouse Parallax Component - Made with Vue.js

一个易于使用的鼠标视差组件-由Vue.js制成

用法 (Usage)

In order for the effect to work, the should be contained within

为了使效果发挥作用, 应该包含在

Options can then be passed to like so :

然后可以将选项传递给 像这样:

// App.vue

<parallax-container>

    <parallax-element :parallaxStrength="-5" :type="'translation'">
        <h2>Put your content here</h2>
     </parallax-element>

</parallax-container>

道具 (Props)

PropTypeDefault ValueDescription
parallaxStrengthNumber10Strength of the Parallax Effect
typeString'translation''translation' - 'rotation' - 'depth'
Struts 类型 默认值 描述
视差强度 10 视差效果的强度
类型 '翻译' '翻译'-'旋转'-'深度'

构建设置 (Build Setup)

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# run unit tests
npm run unit

# run all tests
npm test

翻译自: https://vuejsexamples.com/an-easy-to-use-mouse-parallax-component-with-vue-js/

vue视差滚动

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值