Linear gradient | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

Linear gradient

How can I change the background color to linear-gradient (on button click)?

18th May 2019, 6:19 AM
Nerderkips
Nerderkips - avatar
3 Answers
+ 4
I tried document.getElementById(""). Style.background = "linear-gradient(to right, red, black)" But it didn't work...
18th May 2019, 6:36 AM
Nerderkips
Nerderkips - avatar
+ 3
What is ""
18th May 2019, 11:42 AM
Calviղ
Calviղ - avatar
+ 1
Here’s a full tutorial on CSS Graidents including how to use the linear-gradient property: https://youtu.be/TYHFe4L9bfo
25th Oct 2019, 10:16 AM
Dev Dreamer - YouTube
Dev Dreamer - YouTube - avatar