4 ustunli maket
CSS yordamida 4 ustunli maket to‘rini (grid) yaratishni o‘rganing.
To‘rt 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 class="column"></div>
</div>
2-qadam) CSS qo‘shing:
Ushbu misolda to‘rt ustunli maket yaratamiz:
Misol
.column {
float: left;
width: 25%;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
O‘zingiz sinab ko‘ring »
Ushbu misolda moslashuvchan to‘rt 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!
