CSS 0 dan: Layout, Responsive, Animatsiya
📌 Mundarija
1) CSS nima?
CSS (Cascading Style Sheets) — HTML ko‘rinishini (dizaynini) boshqaradi: rang, font, joylashuv, animatsiya.
2) CSS ulash
<link rel="stylesheet" href="style.css">
3) Selektorlar
/* Element */
p { font-size: 18px; }
/* Class */
.card { padding: 16px; }
/* ID */
#hero { margin-top: 20px; }
/* Nested */
nav a { text-decoration: none; }
/* Pseudo */
a:hover { opacity: .85; }4) Box Model
- content → padding → border → margin
.box{
width: 300px;
padding: 16px;
border: 1px solid rgba(255,255,255,.2);
margin: 20px;
}5) Matn, rang, fon
body{
background: #050510;
color: #e7e7f0;
font-family: "Segoe UI", sans-serif;
}
h1{ font-size: 40px; letter-spacing: .5px; }
.muted{ color: rgba(231,231,240,.7); }6) Flexbox
.row{
display:flex;
gap:14px;
align-items:center;
justify-content:space-between;
}Flex — menyu, kartalar qatorini tez yig‘ish uchun juda qulay.
7) Grid
.grid{
display:grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 16px;
}8) Responsive (telefon)
@media (max-width: 768px){
.row{ flex-direction: column; align-items: stretch; }
h1{ font-size: 30px; }
}9) Hover, transition, animatsiya
.card{
transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover{
transform: translateY(-4px);
}10) Mini-loyiha: “Neon Dark UI”
- Header + menu (flex)
- Grid kartalar (grid)
- Hover effekt
- Responsive
✅ Maqsad
Hozirgi saytning qora fonli, neon uslubini o‘zing 0 dan yasay oladigan darajaga chiqasan.
📞 Aloqa
Savollar bo‘lsa yozing: