Create iPhone7s plus html and css mockup with pure css flip animation

Today’s tutorial is my first in html and css series. And I am very exited to start this vitorial with pure css flip animation within html phone mockup:

First, I am going to add html structure, than some scss rules, based on my Adobe Illustrator tutorial “How to create iphone 7s plus vector mockup“.

I’m using modern workflow with Sass, Gulp and Browsersync, but would be available in plain CSS too. Let’s get started.

Folder structure of our phone mockup

Folder structure iphone css and html mockup

Project structure is pretty simple. There are only two required files:

  1. Index.html into the root folder
  2. Style.css inside css/ folder.

You can also see scss/ folder, that contains style.scss. Another files are related to gulp and git.

HTML structure

All our building blocks are within section with class .phone.

First two divs ( .row1 and .row2 ) are wrappers for our earpeace ( two small circles and one rectangle on top of our phone ).

Next group of spans with class .control represents our side controls.

Input[ type=”checkbox” ].btn is our key element and our animation toggler. It’s accompanied by div.class=”screen” with to child elements: section.front and section.back. They are all altogether is our animation target.

Last element is a label.btn is used for styling purposes. It “hides” our checkbox field.

CSS/SCSS styles of our phone


One thought on "Create iPhone7s plus html and css mockup with pure css flip animation"

Leave a Reply

Your email address will not be published. Required fields are marked *

join our newsletter

Subscribe to the weekly newsletter: