Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Give multiple colors to a button using css

Tags:

css

I Want to color a button just like this. Is there any way i can do this by using css?

Button should look like this

like image 671
Nidhin Radh Avatar asked May 29 '26 02:05

Nidhin Radh


1 Answers

You can use a linear gradient.

JSFiddle

button {
  height: 50px;
  width: 100px;
  background: linear-gradient(-60deg, red 50%, yellow 50%);
}
<button></button>
like image 157
Rob Monhemius Avatar answered May 30 '26 18:05

Rob Monhemius



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!