CSS 3 · Responsive design
Scale a size fluidly
Keep a font size between a minimum and maximum, growing with the viewport.
h1 {
font-size: clamp(1.75rem, 4vw, 3rem);
}
CSS 3 · Responsive design
Keep a font size between a minimum and maximum, growing with the viewport.
h1 {
font-size: clamp(1.75rem, 4vw, 3rem);
}
Was this page helpful?