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

Why do multiple gradients don't apply?

Why only the first gradient apply here?

html {
 background-color: #110b53;
 background: radial-gradient(
 circle at top left,
 #044b8d 5%,
 #110b53 35%,
 #110b53 60%
 ),
 radial-gradient(
 circle at top right,
 #8b0460 5%,
 #110b53 35%,
 #110b53 60%);
}

Should i create multipale classes for ecah 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

>Solution :

Because they both cover the entire page with no opacity. So one is sitting on top of the other.

If you add a transparent portion to one, it lets the other show through.

html {
  background-color: #110b53;
  background: radial-gradient(circle at top left,
      #044b8d 5%,
      #110b53 35%,
      #110b53 60%,
      transparent
      /* this */
    ),
    radial-gradient(circle at top right,
      #8b0460 5%,
      #110b53 35%,
      #110b53 60%);
}
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