Search results
HTML5 introduced a method to let web designers take control over the viewport, through the <meta>tag. You should include the following <meta>viewport element in all your web pages: <meta name="viewport" content="width=device-width, initial-scale=1.0">.
1 sie 2024 · This article describes how to use the "viewport" <meta> tag to control the viewport's size and shape.
Controls the viewport (the user's visible area of a web page). The viewport varies with the device, and will be smaller on a mobile phone than on a computer screen. You should include the following <meta> viewport element in all your web pages: <meta name="viewport" content="width=device-width, initial-scale=1.0">.
Wartość ta jest zazwyczaj zależna od przeglądarki, lecz możemy wymusić by nasza mobilna wersja strony domyślnie wyświetlała się w 10-krotnym przybliżeniu: 1. < metaname="viewport"content="initial-scale=10" >. Możemy ją również pokazać w całej swej okazałości, bez skalowania: 1.
5 kwi 2024 · Element <meta> viewport daje przeglądarce instrukcje, jak kontrolować wymiary i skalowanie strony. Dodanie kodu width=device-width zapewni, że strona zostanie przeskalowana tak, aby dopasować się do szerokości ekranu, co również będzie się różnić w zależności od urządzenia użytkownika.
The viewport is a short tag that is included in the head of your HTML document that tells the browser how the page should be rendered. See the Best Practice example below. <meta name="viewport" content="width=device-width,initial-scale=1">.
To set up the Viewport, add the following meta tag to the <head> section of your HTML document: <meta name="viewport" content="width=device-width, initial-scale=1.0"> The above meta tells browsers to set the page width based on the device's screen width and not to apply any initial zoom.