Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How are linear gradients done in general? css

enter image description here

i need gradient like this

i take black and white colors to make a gradient

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

background: linear-gradient(0deg,rgba(0,0,.3),rgba( 255,255,0));

But where did I get the yellow from?
enter image description here

.line {
background: linear-gradient(0deg,rgba(0,0,.3),rgba( 255,255,0));
color:white;
height:20px;
text-align: center;
}
<div class = 'line'>Test Gradient</div>

help me please

>Solution :

rgb value 255, 255, 0 is yellow.
You probably wanted to use 255, 255, 255 but made a typo.

It will be fixed if you change background value with this:

linear-gradient(0deg, rgba(0,0,0,.3), rgb(255,255,255))

Edit: You should also update rgba(0,0,.3) with rgba(0,0,0,.3) as
@Ouroborus suggested in the comments.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading