add css demos for 223015c chapter 2: selectors, specificity, box-model, colors, pseudo, responsive

This commit is contained in:
2026-04-20 10:53:11 +02:00
parent a2934f1327
commit fb361a2854
35 changed files with 747 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Responsive Design 3 Viewports</title>
<style>
html, body { margin: 0; padding: 0; font-family: system-ui, sans-serif; background: #fff; }
body { padding: 1rem; }
.viewport {
margin-bottom: 12px;
border: 1px solid #9ca3af;
border-radius: 4px;
overflow: hidden;
}
.bar {
background: #e5e7eb;
padding: 4px 10px;
font-size: 11px;
color: #374151;
font-family: ui-monospace, monospace;
border-bottom: 1px solid #9ca3af;
}
iframe { display: block; width: 100%; border: 0; }
.vp-mobile iframe { width: 360px; }
.vp-tablet iframe { width: 800px; }
.vp-desktop iframe { width: 1100px; }
.vp-mobile { width: 362px; }
.scroll { overflow: hidden; }
</style>
</head>
<body>
<div class="viewport vp-mobile">
<div class="bar">Mobile @ 360px</div>
<div class="scroll"><iframe src="./css-responsive-container.html" height="80"></iframe></div>
</div>
<div class="viewport vp-tablet">
<div class="bar">Tablet @ 800px</div>
<div class="scroll" style="overflow-x: auto;"><iframe src="./css-responsive-container.html" height="100"></iframe></div>
</div>
<div class="viewport vp-desktop">
<div class="bar">Desktop @ 1100px</div>
<div class="scroll" style="overflow-x: auto;"><iframe src="./css-responsive-container.html" height="100"></iframe></div>
</div>
</body>
</html>