CSS 默认网页宽度 - 1024 像素或 980 像素?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10538599/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
default web page width - 1024px or 980px?
提问by Brian Mains
When developing web applications, in the past the choice has been 800px
or 1024px
to fit within the monitor of the user. I've been researching responsive web design and fluid designs, and it seems a lot of them define the 980px
width. With the addition of smart phones and tablets, and factoring in the other possible viewports
在开发 Web 应用程序时,过去的选择是800px
或1024px
适合用户的监视器。我一直在研究响应式网页设计和流体设计,似乎很多都定义了980px
宽度。添加智能手机和平板电脑,并考虑其他可能的视口
Is 980px
the new de-facto standard?
是980px
在新的事实上的标准?
Thanks.
谢谢。
采纳答案by paul
If it isn't I could see things heading that way.
如果不是,我可以看到事情朝着那个方向发展。
I'm working on redoing the website for the company I work for and the designer they hired used a 960px width layout. There is also a 960px grid system that seems to be getting quite popular (http://960.gs/).
我正在为我工作的公司重做网站,他们雇用的设计师使用了 960 像素宽度的布局。还有一个 960 像素的网格系统,它似乎越来越流行(http://960.gs/)。
I've been out of web stuff for a few years but from what I've read catching up on things it seems 960/980 is about right. For mobile ~320px sticks in my mind, by which 960 is divisible. 960 is also evenly divisible by 2, 3, 4, 5, and 6.
我已经离开网络几年了,但从我读到的东西来看,960/980 似乎是正确的。对于移动设备~320px 在我的脑海里,960 可以被整除。960 也可以被 2、3、4、5 和 6 整除。
回答by sudip
I use mostly 978px width for my designs. Adv. of 978px : can be divided by 2,3.
我的设计主要使用 978px 宽度。高级 978px :可以除以 2,3。
回答by hammerbrostime
980 is not the "defacto standard", you'll generally see most people targeting a size a little bit less than 1024px wide to account for browser chrome such as scrollbars, etc.
980 不是“事实上的标准”,您通常会看到大多数人的目标尺寸略小于 1024 像素宽,以考虑浏览器镶边,例如滚动条等。
Usually people target between 960 and 990px wide. Often people use a grid system (like 960.gs) which is opinionated about what the default width should be.
通常人们的目标宽度在 960 到 990 像素之间。人们经常使用网格系统(如 960.gs),该系统对默认宽度应该是什么有意见。
Also note, just recently the most common screen size now averages quite a bit bigger than 1024px wide, ranking in at 1366px wide. See http://techcrunch.com/2012/04/11/move-over-1024x768-the-most-popular-screen-resolution-on-the-web-is-now-1366x768/
另请注意,最近最常见的屏幕尺寸现在平均比 1024 像素宽大很多,排在 1366 像素宽。见http://techcrunch.com/2012/04/11/move-over-1024x768-the-most-popular-screen-resolution-on-the-web-is-now-1366x768/
回答by Hades
This is a bit of an open ended question since screen sizes are changing all the time and what might have been correct two years ago would likely be out of date now.
这是一个开放式问题,因为屏幕尺寸一直在变化,两年前可能正确的内容现在可能已经过时了。
I use Twitter Bootstrap 3 at present and it uses a fluid grid system designed to work at sizes ranging from mobile/very small all the way up to the huge wide screen monitors that are now available.
我目前使用 Twitter Bootstrap 3,它使用一个流体网格系统,设计用于从移动/非常小的一直到现在可用的巨大宽屏显示器的尺寸范围内工作。
Currently the upper default in BS3 is 1200px which translates to a container width of 1144px after taking account of margins and padding of the grids elements.
目前 BS3 中的上限默认值为 1200 像素,在考虑了网格元素的边距和填充后,转换为 1144 像素的容器宽度。
In my experience, modern designers are working to a width of around 1366px for desktop. All recent designs I've been given to implement have been 1366px.
根据我的经验,现代设计师的桌面宽度约为 1366 像素。我最近获得的所有设计都是 1366px。
Note also that you can customise the BS3 grid quite heavily. For example we will use a 32 column grid with 4px gutter in our sites/designs going forwards.
另请注意,您可以大量自定义 BS3 网格。例如,我们将在我们的网站/设计中使用 32 列网格和 4px 装订线。
Ultimately the decision on page width needs to be made based on your website analytics and the screen sizes that your visitors typically use.
最终,需要根据您的网站分析和访问者通常使用的屏幕尺寸来决定页面宽度。
回答by Thair
even there is no right or wrong answer for this question , but I personally prefer 960px width . since all modern monitors support at least 1024 × 768 pixel resolution. 960 is divisible by 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 30, 32, 40, 48, 60, 64, 80, 96, 120, 160, 192, 240, 320 and 480. This makes it a highly flexible base number to work with.
即使这个问题没有正确或错误的答案,但我个人更喜欢 960px 宽度。因为所有现代显示器都支持至少 1024 × 768 像素的分辨率。960 可以被 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 30, 32, 40, 48, 60, 64, 80, 96, 120, 160, 192整除240、320 和 480。这使它成为一个高度灵活的基数。
see this article that shows most popular screens resolutions 2013-2014 in US and UK : http://www.hobo-web.co.uk/best-screen-size/
请参阅这篇文章,其中显示了 2013-2014 年美国和英国最流行的屏幕分辨率:http: //www.hobo-web.co.uk/best-screen-size/