简体   繁体   English

使网站在所有设备和屏幕尺寸上都可用且一致的最佳实践是什么?

[英]What are the best practices for making a website usable and consistent across all devices and screen sizes?

Confused regarding best methodology to make website usable and consistent across all devices - Desktops, Netbooks or Ipads and Mobiles(mostly smart phones).对使网站在所有设备(台式机、上网本或 Ipad 和移动设备(主要是智能手机))上可用且一致的最佳方法感到困惑。

I'm not a Front End Developer or Designer so i'm not sure what is the best thing out there.我不是前端开发人员或设计师,所以我不确定什么是最好的。

I've been reading on Liquid Layouts, Keeping 2 different version of style sheets(1 for screen and 1 for hand held devices) and CSS Media Queries.我一直在阅读 Liquid Layouts、Keeping 2 different version of style sheet(1 个用于屏幕,1 个用于手持设备)和 CSS 媒体查询。

I'm not sure which one of these is the best fit to provide a consistent experience to the users of my site whether they're on smart phones(any android, BB, iphone, Nokia) netbooks or desktops.我不确定其中哪一个最适合为我网站的用户提供一致的体验,无论他们是使用智能手机(任何 android、BB、iphone、诺基亚)上网本还是台式机。

Please help.请帮忙。

As I said in the comment, I think you should keep things as simple as you can and comply with good standards as HTML and CSS.正如我在评论中所说,我认为您应该尽可能简单,并遵守 HTML 和 CSS 等良好标准。

Let the browser / user choose the best way to use your site.让浏览器/用户选择使用您网站的最佳方式。

Also keep in mind graceful degradation / progessive enhancement and a logical structure that supports the pages.还要记住优雅降级/渐进增强和支持页面的逻辑结构。

What you are looking for is called Responsive Web Design .您正在寻找的是所谓的响应式 Web 设计

Fluid grids, flexible images, and media queries are the three technical ingredients for responsive web design, but it also requires a different way of thinking.流体网格、灵活图像和媒体查询是响应式 web 设计的三个技术要素,但也需要不同的思维方式。 Rather than quarantining our content into disparate, device-specific experiences, we can use media queries to progressively enhance our work within different viewing contexts.与其将我们的内容隔离到不同的、特定于设备的体验中,我们可以使用媒体查询在不同的查看环境中逐步增强我们的工作。 That's not to say there isn't a business case for separate sites geared toward specific devices;这并不是说没有针对特定设备的单独站点的商业案例。 for example, if the user goals for your mobile site are more limited in scope than its desktop equivalent, then serving different content to each might be the best approach.例如,如果您的移动网站的用户目标在 scope 中比在其桌面版中更受限制,那么为每个网站提供不同的内容可能是最好的方法。

But that kind of design thinking doesn't need to be our default.但这种设计思维不需要成为我们的默认设置。 Now more than ever, we're designing work meant to be viewed along a gradient of different experiences.现在比以往任何时候都更重要的是,我们正在设计旨在通过不同体验的梯度来查看的作品。 Responsive web design offers us a way forward, finally allowing us to “design for the ebb and flow of things.响应式 web 设计为我们提供了前进的道路,最终让我们能够“为事物的潮起潮落而设计。

There is a good free introductory video on Think Vitaimin . Think Vitaimin上有一个很好的免费介绍视频。

Responsive Web Design: Fundamentals: Introduction 响应式 Web 设计:基础知识:简介

Watch until about 3/4 the way through, where they start demonstrating what they are talking about.观察到大约 3/4 的时候,他们开始展示他们在说什么。

From what I've gathered (been researching it myself) it's really a combination of everything.根据我收集到的信息(我自己一直在研究),它确实是所有东西的结合。 Liquid layouts work great for different monitor sizes, while media queries help target mobile and tablet devices.流动布局适用于不同的显示器尺寸,而媒体查询有助于定位移动和平板设备。 I've been looking the 978 Grid System to format a few websites I'm working on.我一直在寻找978 Grid System来格式化我正在开发的一些网站。 It has grids for several devices, but part of me thinks it might be a bit too bulky for what I want to do.它有几个设备的网格,但我的一部分认为它对于我想做的事情来说可能有点太笨重了。

I think that liquid layouts are the best because they are the most cross-platform and are very easy to do.我认为流式布局是最好的,因为它们是最跨平台的并且非常容易实现。 I use them on every site I make.我在我制作的每个网站上都使用它们。

Even among tablet devices the difference in screen size and screen resolution can require different fonts size and link spacing, for legibility of the font and the accurate touchability of the links.即使在平板设备中,屏幕尺寸和屏幕分辨率的差异也可能需要不同的 fonts 尺寸和链接间距,以确保字体的易读性和链接的准确可触性。 Pages that render on the 10" iPad legibly may be difficult to read and clumsy to use on a 7" tablet.在 10 英寸 iPad 上清晰呈现的页面可能难以阅读,并且在 7 英寸平板电脑上使用起来很笨拙。 The 7" tablet might make you feel as though you had fingers like Shrek. This just happened to me recently when I used a 7" tablet to look at a site that I'd modified to work well on the iPad. 7 英寸平板电脑可能会让您觉得自己的手指就像史莱克一样。最近,当我使用 7 英寸平板电脑查看经过修改以在 iPad 上运行良好的网站时,这发生在我身上。 Too tiny to read on the 7" tablet, and you don't always want your 7" tablet users to be pinch-zooming just so they can read your page and interact with it.在 7 英寸平板电脑上阅读太小,您并不总是希望您的 7 英寸平板电脑用户捏拉缩放,以便他们可以阅读您的页面并与之交互。 You must determine the size of the target screen and employ appropriate CSS styling for that form-factor, and you may also be required to reduce the amount of content and/or to provide alternate mode of navigation for the smaller and smallest form-factors.您必须确定目标屏幕的大小并针对该外形尺寸采用适当的 CSS 样式,并且您可能还需要减少内容量和/或为更小和最小的外形尺寸提供替代导航模式。 Dynamically-served form-factor-specific content may be required, or highly granular control of content visibility using CSS.可能需要动态提供特定于外形尺寸的内容,或者使用 CSS 对内容可见性进行高度精细的控制。

I'd start with pages that have an "airy" look -- avoiding pages that have too much content and are too "busy".我会从具有“通风”外观的页面开始——避免内容过多且过于“忙碌”的页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM