Twitter bootstrap and maximum width for mobile?

I would like to set a fixed for mobile devices at 320 pixels - I would like my site to always look the same as on a screen for 320 pixels .

I tried to set a fixed width to 320 pixels, for example:

@media (max-width: 320px) { body { width: 320px; } } 

But this code does not work. Is there any way to do this?

+4
source share
1 answer

You can use the meta tag in your html.

 <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=320, height=device-height, target-densitydpi=medium-dpi" /> 
+6
source

Source: https://habr.com/ru/post/1469082/


All Articles