ENع
الدرس 04 · Styling basics

The box model

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

The browser lays out every element as a box with four layers: content, padding, border and margin. Apply one rule to a .card box, one line at a time, and watch each layer grow: width and height size the content, padding and border make the box bigger, and margin pushes the next box away. Add up the real size, then see how box-sizing: border-box makes width and height measure the whole box instead.

9 دقيقة7 خطوات5 أسئلةBeginner
شكل 4 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.