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 to make light shine on the background using HTML/CSS/JS?

I just had a question as to whether or not you can add in a glow/light shining sort of effect on the background in a webpage through the use of HTML, CSS or JavaScript (I don’t think JavaScript can do this, however, just thought I’d include it)? If possible, how exactly do you achieve this? I have attached an image here: This . In short, what I’m asking is, how exactly do you achieve a glow/light shining effect on the background of a page?

Hope you understood my doubt (if not, feel free to ask in the comments).

Thanks in advance!

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 :

Use radial-gradient()

.screen {
  margin: 0 auto;
  width: 150px;
  height: 300px;

  background: rgb(193,193,193);
  background: radial-gradient(circle at 90% 5%, rgba(123,123,123,1) 0%, rgba(50,50,50,1) 26%, rgba(0,0,0,1) 52%);
}
<div class='screen'></div>
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