Welcome to Day 9 of learning CSS.

As i have told earlier, this series is inspired by this awesome youtube series in freecodecamp channel.

We will start with 3D Layering Effect on day-9. Open your code editor and create a new 9.1-3DLayer folder and two files index.html and sandbox.css inside it.

Next, in index.html put the basic html.

Basic HtmlBasic Html

Now, add the img folder containing these images. All the svgs are from the layer.psd file.

ImagesImages

Now, let’s put some basic CSS in sandbox.css to show all the svg images.

sandboxsandbox

It will show as below in browser.

Initial svgsInitial svgs

Next, let’s align the images in svg by putting this in sandbox.css

AligningAligning

It will perfectly align all the svg images.

Aligned imagesAligned images

Now, it’s time for the 3D effect. We are basically using translate and rotate to rotate each svg image, but the key here is to use perspective as it gives 3D effect.

3D effect3D effect

This gives our image this nice animation, with all layers separating on hover.

Layer animationLayer animation

We will next start with Dropdown menu on day-9. Open your code editor and create a new 9.2-DropdownMenu folder and two files index.html and sandbox.css inside it.

Next, in index.html put the basic html.

Basic dropdownBasic dropdown

With the basic html our page looks like below.

Basic PageBasic Page

Let’s put some basic css in sandbox.css

Basic CSSBasic CSS

It will style the button nicely

Button styledButton styled

Let’s now complete the dropdown css.

CSS completeCSS complete

It will complete our dropdown and show this nice dropdown on hover.

The DropdownThe Dropdown

This completes day 9 of the course. You can find the code for the same here.

This post is also available on DEV.