Can someone show me how brightness property works in an image? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can someone show me how brightness property works in an image?

Brightness filter on an image or text should be added I just want to know how.

23rd Jun 2018, 8:32 AM
Rocky
Rocky - avatar
7 Answers
+ 6
Hello, Rocky ! The function you are looking for is a filter. It is capable of performing a number of image effects, including brightness: css: <style> .new_Image {     filter: brightness(100%); } </style> html: <img src='image.png' class='new_Image'/>
23rd Jun 2018, 8:36 AM
Alexander Sokolov
Alexander Sokolov - avatar
+ 5
Rocky, please provide your code.
23rd Jun 2018, 8:45 AM
Alexander Sokolov
Alexander Sokolov - avatar
+ 4
Rocky, Please indicate your image in your code, and then I think everything will work
23rd Jun 2018, 8:48 AM
Alexander Sokolov
Alexander Sokolov - avatar
+ 4
I've never seen something prefixfree couldn't fix, but according to just ONE source you must include prefixes for brightness in text: @keyframes example{ 0%{ filter: brightness(0); -webkit-filter:brightness(0); } 100%{ filter: brightness(1); -webkit-filter:brightness(1); } } Annoyingly, that worked for me (while prefixfree did not)
2nd Jul 2018, 4:57 AM
Kirk Schafer
Kirk Schafer - avatar
+ 1
it doesn't work with texts??
23rd Jun 2018, 8:49 AM
Rocky
Rocky - avatar
0
I did try it did not change anything do u have code?
23rd Jun 2018, 8:43 AM
Rocky
Rocky - avatar
0
https://code.sololearn.com/WaGu0eayI74J/?ref=app. I did try it with brightness filter did not work though
23rd Jun 2018, 8:46 AM
Rocky
Rocky - avatar