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

https://github.com/swanie21/animal-parallax

Parallax Example
https://github.com/swanie21/animal-parallax

css3 html5 parallax-scrolling

Last synced: over 1 year ago
JSON representation

Parallax Example

Awesome Lists containing this project

README

          

# Animal Parallax

![gif](./animal-parallax.gif)

### Parallax scrolling is an effect where the background content (usually an image) is moved at a different speed than the foreground context while scrolling.

Use `background` properties, viewport height and viewport width to position the `background-image`

```
section {
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
height: 100vh;
width: 100vw;
}
```

Use `nth-of-type` to set a specific `background-image` to each `section`

```
section:nth-of-type(2) {
background-image: url('../img/bunny.jpg');
}
```

[Click here for more info about parallax scrolling](https://medium.com/@kswanie21/the-simplicity-of-parallax-82ff7896e43#.1d0ye1dap)