Giter Club home page Giter Club logo

axial3d's Introduction

轴动效果 axial3d

npm version npm downloads MIT

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>

属性 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 取消事件监听 -

License

MIT

axial3d's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.