AMP • TR
2025'te responsive web tasarım trendleri, en iyi uygulamalar ve modern web sitesi tasarım rehberi. Mobile-first yaklaşım ve performans optimizasyonu.
2025'te web tasarım, kullanıcı deneyimini merkeze alan, her cihazda mükemmel çalışan ve performans odaklı bir hale geldi. Bu kapsamlı rehberde, modern responsive web tasarımın tüm yönlerini ele alıyoruz.
Responsive web tasarım, bir web sitesinin tüm cihazlarda (masaüstü, tablet, mobil) otomatik olarak uyum sağlayarak en iyi görüntüyü vermesidir.
📊 İstatistikler 2025:
/* Mobile First CSS */
/* Önce mobil için tasarla */
.container {
width: 100%;
padding: 15px;
}
/* Sonra büyük ekranlar için genişlet */
@media (min-width: 768px) {
.container {
max-width: 720px;
margin: 0 auto;
}
}
@media (min-width: 1200px) {
.container {
max-width: 1140px;
}
}
Ekran boyutuna göre dinamik font boyutları:
/* Responsive Typography */
:root {
/* Minimum 16px, maksimum 24px */
font-size: clamp(16px, 2vw, 24px);
}
h1 {
/* Başlık için fluid boyut */
font-size: clamp(2rem, 5vw, 4rem);
line-height: 1.2;
}
Modern layout sistemleri:
/* Responsive Grid Layout */
.grid-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
}
/* Responsive Flexbox */
.flex-container {
display: flex;
flex-wrap: wrap;
gap: 15px;
}
.flex-item {
flex: 1 1 300px; /* grow, shrink, basis */
}
/* Container Query - Artık Media Query değil! */
@container (min-width: 400px) {
.card {
display: grid;
grid-template-columns: 1fr 2fr;
}
}
/* Extra Small Devices (Mobil Portrait) */
@media (max-width: 575px) { }
/* Small Devices (Mobil Landscape) */
@media (min-width: 576px) { }
/* Medium Devices (Tablet) */
@media (min-width: 768px) { }
/* Large Devices (Laptop) */
@media (min-width: 992px) { }
/* Extra Large Devices (Desktop) */
@media (min-width: 1200px) { }
/* XXL Devices (Large Desktop) */
@media (min-width: 1400px) { }
<!-- Görseller için lazy loading -->
<img src="image.jpg"
loading="lazy"
decoding="async"
alt="Açıklama">
<!-- Iframe için lazy loading -->
<iframe src="video.html"
loading="lazy"></iframe>
<!-- Srcset ile responsive images -->
<img srcset="small.jpg 400w,
medium.jpg 800w,
large.jpg 1200w"
sizes="(max-width: 600px) 400px,
(max-width: 900px) 800px,
1200px"
src="large.jpg"
alt="Responsive görsel">
<!-- Modern format desteği -->
<picture>
<source srcset="image.webp" type="image/webp">
<source srcset="image.jpg" type="image/jpeg">
<img src="image.jpg" alt="Fallback">
</picture>
/* Touch-friendly button */
.button {
min-width: 44px;
min-height: 44px;
padding: 12px 24px;
margin: 8px;
/* Touch feedback */
-webkit-tap-highlight-color: rgba(0,0,0,0.1);
}
/* Kontrast oranı */
.text {
color: #333; /* Minimum 4.5:1 kontrast */
background: #fff;
}
/* Focus indicator */
button:focus {
outline: 3px solid #0066cc;
outline-offset: 2px;
}
/* Skip to content */
.skip-link {
position: absolute;
top: -40px;
left: 0;
z-index: 100;
}
.skip-link:focus {
top: 0;
}
/* Native CSS Nesting */
.card {
padding: 20px;
& .title {
font-size: 24px;
color: #333;
&:hover {
color: #0066cc;
}
}
& .content {
margin-top: 15px;
}
}
/* Parent selector artık mümkün! */
.card:has(img) {
display: grid;
grid-template-columns: 200px 1fr;
}
/* Form validation */
form:has(:invalid) .submit-btn {
opacity: 0.5;
pointer-events: none;
}
.grid-container {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
.grid-item {
display: grid;
grid-template-columns: subgrid; /* Parent grid'i miras al */
}
/* CSS Variables ile Dark Mode */
:root {
--bg-color: #ffffff;
--text-color: #333333;
--accent-color: #0066cc;
}
@media (prefers-color-scheme: dark) {
:root {
--bg-color: #1a1a1a;
--text-color: #e0e0e0;
--accent-color: #4d9fff;
}
}
body {
background-color: var(--bg-color);
color: var(--text-color);
}
Chrome DevTools:
// User Agent Detection (sadece özel durumlar için)
const isMobile = /iPhone|iPad|Android/i.test(navigator.userAgent);
// Viewport boyutu
const viewportWidth = window.innerWidth;
const viewportHeight = window.innerHeight;
// Touch support
const hasTouch = 'ontouchstart' in window;
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "https://www.example.com",
"name": "Site Adı",
"potentialAction": {
"@type": "SearchAction",
"target": "https://www.example.com/search?q={search_term}",
"query-input": "required name=search_term"
}
}
✅ Design:
✅ Performance:
✅ Accessibility:
✅ SEO:
✅ Testing:
/* YANLIŞ */
.container {
width: 1200px; /* Mobilde taşar */
}
/* DOĞRU */
.container {
max-width: 1200px;
width: 100%;
padding: 0 15px;
}
<!-- YANLIŞ: Viewport meta yok -->
<!-- DOĞRU -->
<meta name="viewport" content="width=device-width, initial-scale=1">
/* YANLIŞ */
.button {
width: 20px;
height: 20px;
}
/* DOĞRU */
.button {
min-width: 44px;
min-height: 44px;
}
2025'te responsive web tasarım artık bir lüks değil, zorunluluk! Modern CSS özellikleri, performans optimizasyonları ve kullanıcı odaklı yaklaşımlarla, her cihazda mükemmel çalışan web siteleri oluşturabilirsiniz.
Önemli Noktalar:
S: Responsive design ile adaptive design arasındaki fark nedir? C: Responsive design fluid (akışkan) bir yaklaşım kullanır ve her ekran boyutuna sürekli adapte olur. Adaptive design ise belirli breakpoint'lerde sabit layout'lar kullanır.
S: Mobile-first neden önemli? C: Çünkü mobil cihazlar kısıtlı kaynaklara sahip. Mobil için optimize edip büyük ekranlara ölçeklemek, tam tersinden çok daha kolay ve performanslı.
S: Container queries ne zaman kullanmalıyım? C: Component-based tasarımlarda, özellikle yeniden kullanılabilir bileşenler oluştururken. Media query'ler viewport'a bakar, container query'ler ise parent element'in boyutuna.
İletişim:
Modern ve responsive web sitenizi birlikte oluşturalım! 🚀