轴动效果插件,类似Github404页面

发布时间:2019-06-16 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了轴动效果插件,类似Github404页面脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

轴动效果 axial3d

3D效果页插件,类似 GIThub404 页面动画。

安装引入 Install

npm install axial3d

or

<script src="https://unpkg.COM/axial3d"></script>

例子 Example

Demo

<htML>
<head>
    <title>Demo - Axial3d</title>
</head>
<body>
    <script src="https://unpkg.com/axial3d"></script>
    <div id="axial3d"></div>
    <script>
        (function () {
            var options = {
                selector: '#axial3d',
                imgs: [
                    {src: 'https://bestvist.github.io/axial3d/public/demo1/bg.png', left: '50px', top: '10px'},
                    {src: 'https://bestvist.github.io/axial3d/public/demo1/2.png', left: '150px', top: '10px'},
                    {src: 'https://bestvist.github.io/axial3d/public/demo1/3.png', left: '50px', top: '300px'},
                    {src: 'https://bestvist.github.io/axial3d/public/demo1/4.png', left: '300px', top: '300px'}
                ]
            }
            var effect = new Axial3d(options);
        })()
    </script>
</body>
</html>

轴动效果插件,类似Github404页面

属性 Props

options

属性 说明 类型 可选值 默认值
selector 元素选择器 String - -
imgs 图片组 Array - -
transform 动画形式 String translate / rotate translate
swing 动画幅度 Number - 5

imgs options

属性 说明 类型 可选值 默认值
src 图像路径 String - -
top 图片顶部定位 String - -
bottom 图片底部定位 String - -
left 图片左侧定位 String - -
right 图片右侧定位 String - -
static 图片是否静态,不随鼠标转动 Boolean true / false false

方法 Methods

事件名称 说明 回调参数
destory 取消事件监听 -

项目地址
喜欢的欢迎star????????

脚本宝典总结

以上是脚本宝典为你收集整理的轴动效果插件,类似Github404页面全部内容,希望文章能够帮你解决轴动效果插件,类似Github404页面所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。