An open API service indexing awesome lists of open source software.

https://github.com/alibahaari/tiltjs

Hover over any element and the element tilts inward.
https://github.com/alibahaari/tiltjs

hover tilt

Last synced: 2 months ago
JSON representation

Hover over any element and the element tilts inward.

Awesome Lists containing this project

README

          

# TiltJS

By ***TiltJS***, you hover over any element and the element tilts inward. It just uses *JavaScript*.

## Add Project

Just link TiltJS to your project :
```

```

## Initializing

Then, you should initialize properties, just copy the code below and paste it after the code above.
```

Tilt({
identifier: 'div', // Element (`.E`, `#E` or `E`)
rotationInterval: 45, // Maximum degree for rotation
outRotationX: 0, // The `rotateX` property value of the element after `onMouseOut` event
outRotationY: 0, // The `rotateY` property value of the element after `onMouseOut` event
transitionIn: ['transition-timing-function', 'transition-duration'], // Transition property for `onMouseMove` event
transitionOut: ['transition-timing-function', 'transition-duration'] // Transition property for `onMouseOut` event
});

```
*Note :* All the properties above should be filled; `identifier` should be ***String***, `transitionIn`, `transitionOut` should be ***Array***; `rotationInterval`, `outRotationX`, `outRotationY` should be ***Integer***.