CSS Buttons
Basic Button Styling
See this example:
.button { background-color: #336699; /* blue */ border: none;
color: white; padding: 15px 32px; text-align: center;
text-decoration: none; display: inline-block; font-size: 16px;
}
Button Colors and Size
Blue
Red
Gray
Black
See this example:
.button1
{background-color: #008CBA;font-size: 10px;} /* Blue */ .button2 {background-color:
#f44336;font-size: 12px;} /* Red */
.button3 {background-color: #e7e7e7; color: black;font-size: 16px;} /* Gray */ .button4
{background-color: #555555;font-size: 24px;} /* Black */
Rounded Buttons
2px
4px
8px
50%
Use the border-radius property to add rounded corners to a button:
See this example:
.button1 {border-radius: 2px;} .button2 {border-radius: 4px;} .button3
{border-radius: 8px;}
.button4 {border-radius: 12px;} .button5 {border-radius: 50%;}
Hoverable Buttons
2px
4px
8px
50%