DEV Community

Cover image for CSS3 in 10 days — Day 10
Nabendu
Nabendu

Posted on • Updated on • Originally published at nabendu.blog

CSS3 in 10 days — Day 10

Welcome to Day 10 of learning CSS.

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

We will start with Blurry Effect on day-10. Open your code editor and create a new 10.1-BlurryEffect folder and two files index.html and sandbox.css inside it.

Next, in index.html put the basic html.

Basic HTMLBasic HTML

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

Basic CSSBasic CSS

It will show the images in a nice box in our webpage.

Nice ImagesNice Images

Now, we will put the code in CSS which will blur the images on going inside the box.

blurringblurring

It will show this nice animation on moving the mouse inside the box.

Nice AnimationNice Animation

Now, we will put the code to scale the images on hovering the mouse over it.

Mouse hoverMouse hover

It will complete our code and will give this nice effect of scaling up images.

The complete projectThe complete project

We will next do our last project and it will be a CSS Coffee Cup. Open your code editor and create a new 10.2-CoffeeCup folder and two files index.html and sandbox.css inside it.

Next, in index.html put the basic html.

Basic HTMLBasic HTML

As, you can see from the browser, we have only divs.

Only divsOnly divs

We will create the handle of the coffee cup first. Put the below in sandbox.css

The handleThe handle

It will show this nice handle, which we need to position later.

Nice handleNice handle

Let’s make the coffee cup now.

Coffee cupCoffee cup

Now, we get this nice coffee cup, with coffee inside it.

Coffee cup with CoffeeCoffee cup with Coffee

Now, we will put a brew layer in the coffee.

The brewThe brew

This brew is the thing, which happens by the cream of the coffee. Now, we get this nice half circle inside coffee.

Nice brewNice brew

Now, it’s time to move the handle to the correct position. We will add the following to our handle code.

Handle code changedHandle code changed

This will perfectly align our handle to the cup.

The complete productThe complete product

This completes our CSS in 10 days course. Hope you liked it.

You can find the code for the same here.

Top comments (0)