+ 2
How can I write color stops when I use a repeating function?
There is an example in the lesson background: repeating-linear-gradient(blue, green 20px); How or where should I add color stops?
4 Antworten
+ 3
@visph
It is not work for the last color. "green 200px" set repeating not color stops. For example
div {
height: 400px;
background:repeating-linear-gradient(blue, red 25px, green 200px);
}
It repeat once (400px/200px=2). How to set color stops for last one?
+ 2
background:repeating-linear-gradient(blue, red 25px, green 200px);
Simply add how many colors ( and optionnaly dimensions ) you want ;)
+ 1
Maybe just do:
(blue, red 25px, green 200px, green) ?
... as first and last color values are logicaly respectively for 0 and 100% ^^
( surely, I've just tested it )
- 2
hallo Alex