我现在正在做一个网站,我正在决定是否应该让它流动。固定宽度的网站更容易制作,也更容易使它们看起来一致。

说实话,我个人更喜欢看那些能延伸到显示器全宽的流动网站。我的问题来自于这样一个事实,在大多数现代浏览器中,你可以按住鼠标滚轮来调整任何网站的大小。

那么,创建一个流畅的网站值得吗?


当前回答

评论中有很多好的观点,但从你的问题来看,你似乎真的喜欢流畅的设计,想要创建一个,所以去做吧,这是你的网站,它不必像网络上的其他网站一样。

只要注意每种解决方案的利与弊。

其他回答

是的。页面缩放很棒,但它主要用于使文本变大,而不是使文本填充视口。当然,如果正文文本已经太宽了,缩小它以适应通常会使它无法阅读。

你需要液体布局,如果你想让文本适合视口,无论它是否被放大。

The point about ‘long lines being hard to read’ is often overstated by designers trying to justify fixed width designs(*), but in reality it doesn't seem to hold quite as strongly on-screen as it did on paper. Of course setting a good leading/line-height is important, and max-width can be used to inhibit the worst excesses of long lines. (Set it in font-relative em units.) You don't get max-width in IE6, but that's not the disaster it once was. (You can fix it with a little bit of JavaScript if you really care about those guys. I don't.)

(*这对于高度图形化的布局来说确实更少工作。但对于像StackOverflow这样更简单的布局,没有任何理由不采用液体布局。啧啧@SO,嗯!)

对我来说,让网站变得流畅,但添加最小/最大宽度属性似乎是两全其美的。你支持流动性,但你把它限制在一定的宽度(比如,800px和1200px)。

这取决于你——这里有一些需要考虑的事情:

当行很长时,文本很难阅读。 你的用户可能拥有比正常情况下更大或更小的分辨率,而选择一个“不正确的”静态宽度将会惹恼他们。 维护一个流动站点可能会比较困难,但并不比维护静态站点困难得多。

这取决于你的受众和你的内容。

以下是我尊敬的网站,我认为是模仿的例子。

流体的例子:

亚马逊

维基百科


静态的例子:

苹果

eBay

MSN

StackOverflow

MSDN


一些混合!

CNN

我想大多数时候我更喜欢静态。让它在更多的浏览器中看起来更好更容易。它也更容易阅读。

I think it's nice to be able to scale well on a user's screen, rather than make the users pan and zoom. In a time when users surf the web from such a wide variety of devices, ranging from smartphones to ultra-mobile PCs, each with its own, possibly non-standard resolution, I think it's important to keep user-experience at a high level when your site is viewed on such screens. Regarding the text length, it could be bounded by a certain ratio, so it would fit nicely within the layout. I think there are also frameworks that may help with writing a site in a fluid manner, and help with coding maintainability.

我要反对大多数人,说不。推理:像维基百科这样的流动网站,由于它们的行长,在大屏幕上阅读是一场噩梦(尽管它的引用在最好的时候也很难阅读)。

出现这个问题的原因是,没有一种机制可以根据屏幕分辨率调整文本的大小。如果你可以在更大的分辨率下自动增大文本,你就可以保持每行80多个字符的最佳可读性。

还有图像和其他固定大小元素的问题。你可以拥有较大的图像,并在必要时让浏览器缩小它们,但这样你就会遇到其他问题,比如更长的下载时间,以及许多浏览器中的图像质量问题。