Interactive online courses HTML Academy
2026-03-09 10:47 Diff

The color position (or color stop) specifies the position of the central part of the color, the point from which the transition to another color begins.

What happens if you set the same position for adjacent colors? In this case, there will be a sharp transition of colors, since both of them will “flow” from the same point in opposite directions.

It is easier to demonstrate this behavior with an example:

yellow 25%, green 75%yellow 45%, green 55%yellow 49%, green 51%yellow 50%, green 50%

This technique is often used to create interesting effects.