Create a Simple CSS3 Buttons

In designing a website or any other web application, one of important things and matters is button. Button will make your design look more attractive and eye-catching . So, in this first tutorial, I will explain how to simply create a simple CSS3 button, but still gorgeous and catchy in the end.

Step 1 – HTML


Let’s start with making the HTML’s markup first. In this tutorial, we’ll create a button with 4 different colors.

Preview


Preview step 1 css3 button

Step 2 – Basic CSS


Now, let’s start with the basic CSS, for the display of the button. This basic CSS include of structure, basic color, and basic size of the button we will make. In this step, we still not using the CSS3 property yet.

Preview

Preview step 2 css3 button

Step 3 – Button Color


Next is giving another color at the button. Like I said above, we’ll create button in 4 different colors, because we already have 1 color, which is white, thus we only need to create another 3 colors again. Please look again to the HTML markup that has been done, because there we already have classes for .blue.black and .green.

Preview

Preview step 3 css3 button

Step 4 – CSS3 Properties


Now is the time to add some properties of CSS3. To make the button more attractive and eye-catching, we can add the gradient color, border-radius, text-shadow, and also box-shadow. If you still confuse or not familiar with these properties, you can learn more about them here.

Look again .btn that we have been created before. You can add those codes just like below.

And for the .blue.black and .green , add the codes below.

Preview

CSS3 Buttons

Step 5 – The Button Size


After done with the button color, now we’ll create the 3 different sizes of button. The first one will be the little one. Give the .small class. For the bigger size, give the .large class. And for the normal one, we don’t need to add any class because the basic size of button will be used as the normal size.

Firstly, add the class to identify the button size at our HTML markup.

Then, add the CSS code below into your CSS file.

Preview

Preview step 3 css3 button

The Final Result of Simple CSS3 Buttons


CSS3 Buttons

Conclusion


So, this is the end of our tutorial. Hopefully this tutorial can give you more knowledge, and it will be a useful tutorial for you. Kindly leave a comment, critic, or opinion here as a feedback. Happy trying. Good luck! ;)

DownloadDemo