Interview Question

Difference between linear and radial gradients?

Linear gradients follow a line; radial gradients spread from a center.

💡 Concept ✅ Quick Revision 🎨 CSS

Answer

Linear and radial gradients use different color progression shapes. • A linear gradient changes colors along a line. • A radial gradient changes colors outward from a center as circles or ellipses. • Both support multiple color stops and repeating forms.

💡 Simple Example

.linear { background: linear-gradient(to right, red, blue); } .radial { background: radial-gradient(circle, white, navy); }

⚡ Quick Revision

Linear gradients follow a line; radial gradients spread from a center.