7. Backgrounds
ستتم ترجمة هذا المقال تلقائيًا. يُعرض بالإنجليزية حاليًا.
background-color sets a plain colour. background-image uses a picture or a gradient, for example linear-gradient(...). background-size: cover fills the box, and background-position moves the picture.
A gradient needs no image file, so it loads quickly.
عرض المثال
.hero {
background: linear-gradient(135deg, #7c9cff, #ff6bb5);
color: white;
}
✍️ دورك الآن
Give .hero a linear gradient from red to blue.