如何制作手机版网站
我正在寻找可以帮助我学习如何设置网站的东西,以便人们访问该网站时可以看到常规版本和移动版本。我遇到的问题是,我在谷歌上看到的大多数网站都是付费网站,可以帮助您进行设置。我可以制作网站的两个版本并将它们都加载到我的主机上吗?另外,它如何知道何时加载移动设备和常规设备?这些是我想要学习的东西类型,有什么建议可以从哪里开始吗?
I am looking for something that will help me learn how to set up my site so that when people go to it there is the regular version and the mobile version. Problem I am having is that most of the sites I see on google are pay sites that help you set that up. Can I just make two versions of my site and load them both on my hosting? Also how does it know when to load the mobile versus the regular? These are the types of things I am looking to learn, any suggestions of places to start?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请确保您执行以下操作:
现代 iPhone 和 iPad 完全能够处理大多数全尺寸网站,除非它确实改善了用户体验,否则几乎不需要移动版本。我讨厌被重定向到无法提供我需要的信息的婴儿界面。
移动版本的良好示例包括:
平庸的示例包括:
不良示例包括
这是 Apple 的 有关为 iPad 提供移动版本的建议:
Please please please make sure you do the following:
Modern iPhones and iPads are perfectly capable of handling most full sized websites, there is little need for a mobile version unless it actually improves the user experience. I hate to get redirected to a baby interface that doesn't provide the information I need.
Good examples of mobile versions include:
Mediocre examples include:
Bad examples include
Here's Apple's advice on providing mobile versions to the iPad:
需要研究的是 @mobile css 媒体类型,它用于在移动设备中加载时加载不同的样式。我不确定哪些设备支持它,但我想大多数流行的型号都会支持它。就您的建议而言,您当然可以托管两个单独的站点,但在您遇到麻烦之前,我会挑衅地仔细阅读亚历克斯的建议。
http://www.w3.org/TR/css-mobile/
Something to look into would be the @mobile css media type, which is used to load a different styles when loading in a mobile device. I am not sure which devices support it, but I imagine it would be most of the popular models. As far as your suggestion, you can certainly host two separate sites, but I would defiantly go through Alex's suggestions before you go through the trouble.
http://www.w3.org/TR/css-mobile/
Alex 提出了一些很好的建议,但如果您确实想提供基于移动或非移动的特定版本,您可以查看 http 标头。在某些情况下,用户代理会放弃它,但并非总是如此。查看此链接了解详细信息:http://detectmobilebrowsers.mobi/
Alex had some good suggestions, but if you really want to serve up a specific version based on mobile or non-mobile you can take a look at the http header. In some cases the User Agent will give it away, but not always. Check out this link for details: http://detectmobilebrowsers.mobi/