Agyan
adda
Run
Reset
Copy
CSS Tutorial › CSS Backgrounds › Gradient backgrounds
Back to tutorial
Code
Edit, then press Run or Ctrl+Enter
<style> .box { height: 100px; margin-bottom: 10px; color: white; display: flex; align-items: center; justify-content: center; font-size: 20px; } .linear { background: linear-gradient(to right, #1f386b, #4a90e2); } .radial { background: radial-gradient(circle, #ffb347, #ff5f6d); } </style> <div class="box linear">Linear gradient</div> <div class="box radial">Radial gradient</div>
Result