Search results
CSS has several different units for expressing a length. Many CSS properties take "length" values, such as width, margin, padding, font-size, etc. Length is a number followed by a length unit, such as 10px, 2em, etc. Example. Set different length values, using px (pixels): h1 { font-size: 60px; } p { font-size: 25px; line-height: 50px; }
Learn how to use vh, vw, vmin, and vmax units to size elements relative to the browser viewport. See examples of fullscreen backgrounds, fitting headlines, and centering elements with viewport units.
3 lut 2020 · Vh is a relative length unit that is 1% of the height of the viewport. Learn how to use vh and other CSS units like em, rem, vw, and more in this comprehensive guide.
30 paź 2024 · vh and vw are relative to the viewport's height and width, respectively. The benefit of using relative units is that with some careful planning you can make it so the size of text or other elements scales relative to everything else on the page.
30 kwi 2024 · Learn what a viewport is, how it affects CSS, SVG, and mobile devices, and the difference between the visual viewport and the layout viewport. Find out how to use vh and vw units to set dimensions relative to the viewport size.
27 mar 2020 · Short for “viewport height,” ‘vh’ allows you to size elements relative to the height of the browser window. This means your content will gracefully adjust to any device, from smartphones to ultrawide desktop monitors.
18 gru 2023 · Jednostka ‘vh’ (Viewport Height) jest jednostką względną w CSS. Jeden ‘vh’ jest równy 1% wysokości widocznego obszaru przeglądarki (viewport). Na przykład, jeśli wysokość viewportu wynosi 1000 pikseli, 1 vh będzie równy 10 pikseli.