CSS Positioning
Positionnement CSS
Le positionnement CSS indique par rapport à quoi un élément est placé. Il peut utiliser le flux normal, lui-même, un ancêtre ou la fenêtre comme référence.
Un autre exemple
Un badge utilise un positionnement absolu à l'intérieur d'un avatar. Le conteneur de l'avatar utilise un positionnement relatif.
Parties principales
- 01Outer constraint
- 02Content and spacing model
- 03Computed size or reflow result
Utilisez-le lorsque
Utilisez le positionnement lorsqu'un élément a un objet ou une zone claire à laquelle rester ancré.
Ne l'utilisez pas lorsque
N'utilisez jamais le positionnement absolu à la place d'une mise en page réellement responsive.
Nom utilisé dans le code
position: relative | absolute Avant d'expédier
Check content order, shared design values, component consistency, contrast, zoom, and layout changes by screen size. Verify every theme, language, and state. If there is motion, offer an equal reduced-motion experience.
Outcome: Complete the task with Positionnement CSS (CSS Positioning). User context: Un badge utilise un positionnement absolu à l'intérieur d'un avatar. Le conteneur de l'avatar utilise un positionnement relatif. Design concept to apply: Positionnement CSS (CSS Positioning). Why it fits: Utilisez le positionnement lorsqu'un élément a un objet ou une zone claire à laquelle rester ancré. Do not use it when: N'utilisez jamais le positionnement absolu à la place d'une mise en page réellement responsive. Design requirements: Set the content order, shared design values, and reusable components. Define how the layout changes by screen size and state. Keep useful design choices separate from decoration. Inclusion and resilience: Check contrast, zoom, languages, themes, and reduced motion when needed. Do not use color or effects as the only way to show meaning. Acceptance criteria: The design stays clear on phones and desktops, at zoom, in every theme, and in all supported languages. Interactive states stay clear and consistent. Evidence and limits (evidence boundary): Un document officiel peut quand même être un brouillon, un release candidate, ou la version finale. Vérifie son statut et sa compatibilité avec le navigateur ou la plateforme. Unknowns to confirm: Brand limits, amount of content, supported themes and languages, target devices, and design-system rules.
Vérifiez cette demande
Review how Positionnement CSS (CSS Positioning) is used now. Definition: Le positionnement CSS indique par rapport à quoi un élément est placé. Il peut utiliser le flux normal, lui-même, un ancêtre ou la fenêtre comme référence. Release checks: Check content order, shared design values, component consistency, contrast, zoom, and layout changes by screen size. Verify every theme, language, and state. If there is motion, offer an equal reduced-motion experience. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.