RevealTheme logo

CSS-clamp()-Generator

Erzeugen Sie fluide, responsive CSS-Werte mit clamp(). Skaliert gleichmäßig zwischen Mindest- und Höchstgrößen über die Viewport-Bereiche hinweg.

font-size: clamp(16px, 13.0909px + 0.9091vw, 24px);

So verwenden Sie dieses Tool

  1. 1

    Enter the minimum size in pixels (the value at and below your small viewport).

  2. 2

    Enter the maximum size in pixels (the value at and above your large viewport).

  3. 3

    Set the min and max viewport widths in pixels that define where scaling starts and stops.

  4. 4

    Read the generated clamp() declaration and click Copy to paste it into your stylesheet.

Was ist der CSS-clamp()-Generator?

Die CSS-Funktion clamp(min, bevorzugt, max) hält einen Wert in Grenzen, lässt ihn aber zugleich fluide innerhalb des Bereichs skalieren. Ideal für responsive Typografie, die mit der Viewport-Breite gleichmäßig wächst, statt an den Breakpoints zu springen. Dieses Tool berechnet die korrekte Formel für den bevorzugten Wert aus Ihren Mindest-/Höchstschriftgrößen und den Viewport-Breiten.

Häufige Anwendungsfälle

  • Building fluid headings that grow from 24px on mobile to 48px on desktop without writing media-query breakpoints.

  • Setting responsive body copy that stays readable between a 320px phone and a 1200px laptop.

  • Scaling section padding or gap values fluidly so layouts breathe proportionally across screen sizes.

  • Replacing a stack of font-size overrides at 480px, 768px, and 1024px with one clamp() declaration.

  • Generating clamp() values for a design system so spacing and type scale consistently from one formula.

  • Quickly checking the px and vw math for a fluid value you sketched out in a design tool like Figma.

Häufig gestellte Fragen

Wie steht es um die Browserkompatibilität?
clamp() funktioniert seit 2020 in allen Browsern: Der Einsatz in der Produktion ist völlig unbedenklich.

Verwandte Tools