This page is Almost Ready

Notice: The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.


Property of css/functions/css/functions/


var result = element.repeating-linear-gradient;
element.repeating-linear-gradient = value;



Once the last color stop has been reached, the gradient starts again at the first color stop and repeats. It’s a good idea to specify identical colors for the first and last color stops to prevent abrupt color changes between each repeating group. The syntax for the repeating-linear-gradient function is identical to that of the linear-gradient function. Important The Cascading Style Sheets (CSS) Gradients properties do not require a vendor prefix (that is, "-ms-") to work correctly in Internet Explorer 10. The syntax for the repeating-linear-gradient function given in this topic is different from that supported in previous pre-releases of Internet Explorer 10, which required the "-ms-" prefix. To maximize backward compatibility, those older implementations are still recognized, as described in -ms-repeating-linear-gradient.


repeating-linear-gradient ([ [ <angle> | to <side-or-corner> ] , ] ? <color-stop> [ , <color-stop> ] +)


Optional. The angle the gradient line should assume, expressed as a number followed by an angle units designator(for instance, “deg”)."0deg" points upward and positive angles increase in a clockwise direction. Therefore, “90deg” points toward the right, “180deg” points downward, and so on.If no angle is provided, the gradient line starts in the corner or side opposite the corner or side specified by <side-or-corner>.
Optional value that specifies an corner point or side for the gradient. This value begins with "to", which is followed by one or two of the following keywords. Including one keyword specifies an ending side, and two keywords specify an ending corner.
  • The following values can be used as the first value only:
    • left First value only. Indicates gradient ends on the left.
    • right First value only. Indicates gradient ends on the right.
  • The following values can be used as the second value only:
    • top Second value only. Indicates gradient ends on the top.
    • bottom Second value only. Indicates gradient ends on the bottom.
  • Not including any keywords or angle is equivalent to "to bottom".
At least two color stops are required. Each color stop has one or two components—a color component and an optional position component. The first component defines the color component of a stop point for the gradient. Each stop point has its own designated color, and the area between each point is filled with a continuous color transition from one to the other. This value can be any supported color value.Each stop point can have an optional percentage or supported length value that indicates where along the gradient line to place the color stop. “0%” (or "0px", "0em", and so on) indicates the starting point (or side); “100%” indicates the ending point (or side).

See also

Related articles