CSS Quick Reference Three: Gradients : Stop Points
Between 2008 and 2012 gradients finally appeared in web browsers although as of 2012 they still all required a browser prefix.
|
Fig 5.0 Stop points: you can specify a % of the way across to start using the specified color
linear-gradient(#000000, #ddddff 50%, #ffffff); (Start at 0, go to ddddff at 50%, then go to ffffff)
linear-gradient(#000000, #ddddff 20%, #ddffff 70%, #ffffff); (Start at 0, go to ddddff at 20%, then ddffff at 70% then go to ffffff)
linear-gradient(#000000, #7f0000 15%, #ff0000 30%, #7f7f00 45%, #00ff00 60%, #007f7f 75%, #0000ff);
|
|