3 ustunli maket
CSS yordamida 3 ustunli maket to‘rini (grid) yaratishni o‘rganing.
Uch ustunli maket qanday yaratiladi
1-qadam) HTML qo‘shing:
Misol
<div class="row">
<div class="column"></div>
<div class="column"></div>
<div class="column"></div>
</div>
2-qadam) CSS qo‘shing:
Ushbu misolda uchta teng ustun yaratamiz:
Misol
.column {
float: left;
width: 33.33%;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
O‘zingiz sinab ko‘ring »
Ushbu misolda uchta teng bo‘lmagan ustun yaratamiz:
Misol
.column {
float: left;
}
.left, .right {
width: 25%;
}
.middle {
width: 50%;
}
O‘zingiz sinab ko‘ring »
Ushbu misolda moslashuvchan uch ustunli maket yaratamiz:
Misol
/* Responsive layout - when the screen is less than 600px wide, make the three columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
.column {
width: 100%;
}
}
O‘zingiz sinab ko‘ring »
Maslahat: Veb-sayt maketlari haqida ko‘proq bilish uchun CSS veb-sayt maketi darsligimizga o‘ting.
Maslahat: Moslashuvchan veb-dizayn va gridlar haqida ko‘proq bilish uchun CSS moslashuvchan veb-dizayn darsligimizga o‘ting.
W3Schools Pathfinder
Yutuqlaringizni kuzating – bu bepul!
