tutorialstonight logo
A Platform To Learn To Code

CSS BUTTONS



A button is used to perform certain tasks when clicked.

Example:

  • A button can be used to invoke certain kind of function

  • Fibonacci is sum of two preceding numbers

    Fibonacci here...

    click to see fibonacci series
  • A button can be used to take you to another page



styling button using CSS

Using CSS properties we can design a button according to our need.

Example

Run the code

Button border

Using border property you can define the border of the button.

Example

Run the code

Output:

My button My button My button My button



Button size

Using font-size property you can adjust the size of the button.

Example

Run the code

Output:

My button My button My button My button


Button shadow

Using box-shadow property you can get button shadow.

Example

Run the code

Output:

My Button


Button Hover

Using :hover selector you can define hover property.

Example

Run the code

Output:

My Button My Button My Button My Button


BOX

BOX