linear-gradient() blends colors along a straight line at a given angle or direction, while radial-gradient() blends them outward from a center point in a circular or elliptical shape. Both are values for background or background-image, not standalone properties.
Add an angle such as 90deg or a keyword like 'to right' as the first argument, for example linear-gradient(90deg, #ff0000, #00ff00). 0deg points up and angles increase clockwise, so 90deg goes left to right.
Each color can be followed by a position, like #ff0000 0% or #00ff00 80%, which tells the browser where that color sits along the gradient. Adjusting these percentages controls how sharp or gradual the transition between colors is.
Yes, unprefixed linear-gradient() and radial-gradient() are supported in all modern browsers including Chrome, Firefox, Safari, and Edge. Only very old browsers such as IE 9 and earlier lack support, so vendor prefixes are rarely needed today.