Skip to content

Max Chafkin and Ian King's "Apple iPhone Guts" with CSS 3D transformations.

Notifications You must be signed in to change notification settings

icncsx/iphone-internal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iPhone Internals

This project is a clone of Max Chafkin and Ian King's widly popular popular piece "Apple iPhone Guts". I use CSS 3D transformations to enrich the original - namely by creating a card flip animation.

This is what the 3D transformation looks like:

Methodology

The trick is to have two overlapping div elements - one for the front and another for the back. Each div contains a child img element. Keep the back div at rotate(180) and the front div at rotate(0). Then on hover, the front div will transition to rotate(-180) and the back div will transition to rotate(0)

.front {
    transform: rotateY(0deg);
}

.back {
    transform: rotateY(180deg);
}

.front:hover {
    transform: rotateY(-180deg);
}

.back:hover {
transform: rotateY(0deg);
}

Locally Hosting

Using npm:

npm install

Start the app:

npm start

Public URL

The project is also deployed on Netlify. Check out this link.

Credits

Obviously all the credits go out to the Bloomberg Graphics team. Great job as always!

About

Max Chafkin and Ian King's "Apple iPhone Guts" with CSS 3D transformations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published