Bootstrap: Responsive not working on phone altough viewport included

倖福魔咒の 提交于 2019-12-10 12:36:21

问题


My bootstrap pages are designed responsively. The viewport is stated as required:

`<meta name="viewport" content="width=device-width, initial-scale=1.0" />`

(without the backticks)

In browsers I tested (Safari, Chrome, Firefox), the responsivity works well.

However, iPhones and other smarthphones always show the desktop view.

What am I doing wrong? This is a test page for you to see (sorry it's still a little cluttered): http://zhaw.warnez-services.ch/NaKt/stackoverflow.php (LINK UPDATED)

Interestingly, using a Cloaking service, they send their own head and suppress my viewport instructions.

Thank you for any hints.


回答1:


Viewport tag is not yet added.

Add <meta name="viewport" content="width=device-width, initial-scale=1.0" /> inside the <head></head> of your HTML/PHP.




回答2:


The problem is/was the cloaking service. (nic.ch.vu). It allows to hide the real address and camouflage it with a free and custom one.

If you choose the cloaking option, the address you typed in the address bar will never change, no matter what you click.

These services sent their own head sections, and the viewport tag gets suppressed for some reason.

If you run into the same problem, you must disable cloaking or use the real address.

Thanks to all posters for their help!




回答3:


Well, seems that page you provided is missing the meta - viewport tag in its source.




回答4:


your meta Tag is correct, uhmm i see you only have one css link ""... Question is it repressive? If not check out these tutorials on reponsive design helped me as well. http://www.sitepoint.com/building-responsive-websites-using-twitter-bootstrap/ http://getbootstrap.com/css/

Hope that helps



来源:https://stackoverflow.com/questions/25976375/bootstrap-responsive-not-working-on-phone-altough-viewport-included

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