2025-03-31 18:18:31 +00:00

144 lines
1.9 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# CSS Cheatsheet (Deutsch)
## Grundlegende Eigenschaften
```css
color: red;
```
*Textfarbe setzen.*
```css
background-color: blue;
```
*Hintergrundfarbe setzen.*
```css
font-size: 16px;
```
*Schriftgröße festlegen.*
```css
font-family: Arial, sans-serif;
```
*Schriftart bestimmen.*
```css
text-align: center;
```
*Textausrichtung (z.B. zentriert).*
## Abstände & Größen
```css
margin: 10px;
```
*Außenabstand (außerhalb eines Elements).*
```css
padding: 10px;
```
*Innenabstand (innerhalb eines Elements).*
```css
width: 100px;
```
*Breite eines Elements.*
```css
height: 50px;
```
*Höhe eines Elements.*
## Rahmen
```css
border: 1px solid black;
```
*Rahmen definieren (Dicke, Stil, Farbe).*
```css
border-radius: 10px;
```
*Abgerundete Ecken.*
## Layout & Anzeige
```css
display: flex;
```
*Flexbox aktivieren für flexibles Layout.*
```css
justify-content: center;
```
*Inhalt horizontal ausrichten (Flexbox).*
```css
align-items: center;
```
*Inhalt vertikal ausrichten (Flexbox).*
```css
position: absolute;
```
*Absolute Positionierung (bezogen auf Eltern-Element).*
```css
position: relative;
```
*Relative Positionierung.*
```css
top: 10px; left: 20px;
```
*Positionierung eines Elements (z.B. bei `position: absolute`).*
## Farben & Transparenz
```css
opacity: 0.5;
```
*Transparenz (0 = durchsichtig, 1 = sichtbar).*
## Schatten & Effekte
```css
box-shadow: 2px 2px 5px gray;
```
*Schlagschatten für ein Element.*
```css
text-shadow: 1px 1px 3px black;
```
*Schrift mit Schatteneffekt.*
## Übergänge & Animation
```css
transition: all 0.3s ease;
```
*Sanfte Übergänge für Änderungen.*
```css
animation: fadeIn 2s;
```
*Animation anwenden (muss separat definiert werden).*
## Sonstiges
```css
cursor: pointer;
```
*Mauszeiger zu Hand-Symbol ändern.*
```css
overflow: hidden;
```
*Überlaufenden Inhalt ausblenden.*
```css
z-index: 10;
```
*Reihenfolge auf der Z-Achse (bei überlappenden Elementen).*