Skip to content

micahlisonbee/viewport-reset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

viewport-reset

When using the tag <meta viewport> to target mobile screens, sometimes you don't want to target all devices that recognize this tag.

For example, if you want a viewport to load in 'device-width' for iPhones, but not for iPads.

This javascript snippet will need to be added directly after the metatags in the html head.

You can change the value of the if condition to target different widths. The widths larger than the defined value will have the viewport reset to the default value.

if (viewport.width > 640)

About

Viewport Exclusion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published