为什么我的响应式 html/css 不适用于手机? [英] Why is my responsive html/css not working with mobile phone?

查看:23
本文介绍了为什么我的响应式 html/css 不适用于手机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个测试站点.我在 css 中使用了媒体查询,但是当我在移动设备上加载页面时,我看不到移动版本,并且当我重新调整浏览器大小时,站点是响应式的.我在多个地方都读过不要使用 *-device-width.那么,我错过了什么?分辨率是多少?

I've created a test site. I've used media queries in css but when I load the page on mobile, I don't see the mobile version and when I re-size the browser the site is responsive. I've read at multiple places to not to use *-device-width. So, what am I missing? What could be the resolution?

推荐答案

这是我的错误.我使用 javascript 来覆盖元标记,它导致了正确响应的问题.修复了 javascript.

It was my mistake. I used javascript to override meta tag and it was causing issue in proper responsiveness. Fixed javascript.

这篇关于为什么我的响应式 html/css 不适用于手机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆