Good day to all! Help solve the problem, how to make the general background of the block divided by 50px into multi-colored lights and when changing the block size add or reduce the number of colors and when pointing at a certain block of light showed which light in the list. Thanks in advance for the answer :)

  • Do you mean if anyone wants to solve your puzzle for you? More specifically, what you can not do? - vihtor
  • Do you think if you duplicate the question, then people will be more willing to help you? ru.stackoverflow.com/questions/833666/… - Dmytryk
  • I am now doing a family tree - Iliaz
  • I am now doing a family tree and I need to divide the whole block by year so that the user can see who was born in what period of time I tried to make my generation for each generation, but this is not correct because older brother can be 30 years older and I need to divide by 10 years and I would like to know how to divide the background of the block - Iliaz

1 answer 1

  1. Light and color are different concepts.

  2. Make a gradient block as background-image. For example, such:

background-image:linear-gradient(to right, red 50px, orange 50px, orange 100px, yellow 100px, yellow 150px, green 150px, green 200px, lightblue 200px, lightblue 250px, blue 250px, blue 300px, purple 300px);

  1. With guidance more difficult. An option is to fold a pack of blocks with different background-color into a “common block” and, when hovering the mouse over one of them, use the script to take the value of the background color from this block.