12. Box model Quti modeli). Margin, Padding, Border
1
12. Box model (Quti modeli).
Margin, Padding, Border
Reja:
Box model
💡
Box model - HTMLdagi har bir element CSS uchun shu modelga
asoslangan bo'ladi. Ya'ni CSS har bir elementimizni Box (quti)
modeli ostida ko'radi
Padding
💡
Padding - elementning content qismidan border (chegara)
qismigacha bo'lgan masofa
12. Box model Quti modeli). Margin, Padding, Border
2
<
style
>
.box {
padding: 10px;
}
style
>
-------------------------
<
div
class
="
box
">
Box (quti) modelini amalda ko'rish
div
>
Border
💡
Border - elementning chegarasi
<
style
>
.box {
border-width: 5px;
border-style: solid;
border-color: blue;
}
style
>
-------------------------
<
div
class
="
box
">
Box (quti) modelini amalda ko'rish
div
>
Margin
💡
Margin - element va uning atrofidagi elementlar orasidagi masofa
<
style
>
.box {
margin: 10px;
}
style
>
-------------------------
<
div
class
="
box
">
Box (quti) modelini amalda ko'rish
div
>
12. Box model Quti modeli). Margin, Padding, Border
3
Do'stlaringiz bilan baham: |