Bootstrap XS version not working on phone and tablet

微笑、不失礼 提交于 2019-12-22 04:34:06

问题


I am designing my site (danielrojas.net) with Bootstrap and have created a separate layout for the XS viewports. It works beautifully when I resize my desktop browser (Chrome) and when I try it on Responsinator.com or similar.

However, on my actual Android phone and tablet (both using Chrome, tested using the built-in browser as well), the standard version is shown, no matter what. I have included the magic viewport META tag:

<meta name="viewport" content="width=device-width, initial-scale=1">

To no avail. I am using a customized Bootstrap CSS, but even loading the official one, the same error remains.

Other sites (e.g. getbootstrap.com) work fine on both devices. What am I missing?

Thanks in advance!


回答1:


You are right that you have included <meta> tag. But it is in the frame.

By inspecting your code, Its not there in the main <head>. So Include it in that part also.

<meta name="viewport" content="width=device-width, initial-scale=1">

I'm also not sure, responsive will work on iframe, You should avoid using iframe if its not working.



来源:https://stackoverflow.com/questions/20883810/bootstrap-xs-version-not-working-on-phone-and-tablet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!