浏览器支持 CSS 宽度 1000px

发布于 2024-12-18 15:38:27 字数 834 浏览 3 评论 0原文

是否有不支持宽度 1000px 加右滚动的常用浏览器?

注意:“支持”我的意思是“如果它支持 1000px 宽度而不在底部创建水平滚动” “(很抱歉一开始没有解释这一点)

例如 IE7 怎么样?

我不想让底部滚动...

我知道如果侧面没有空间,它在某些 1024 屏幕上可能看起来很糟糕。

我添加一个示例,以便您更好地理解:

询问的原因是因为我不想在广泛使用的浏览器中在我的网站上出现水平滚动。我没有安装任何旧的IE版本,所以我无法自己测试。

请注意,3000px 高度的 div 将导致向右垂直滚动...因此“浏览器窗口宽度”的宽度必须至少为 1000px 才能工作(1024 减去右滚动(减去左边框))

<!DOCTYPE html>
<html>
<head>
<title>Untitled Document</title>
</head>
<body style="margin:0">
<div style="width:1000px;height:3000px">Will this div creat a horizontal scroll bar in any widly used browser, with window size of 1024 x 768px <? What about Internet Explorer 7 and Internet Explorer 8?</div>
</body>
</html>

Are there any wildy used browsers that doesn't support width 1000px plus right scroll?

NOTE: With "support" I mean "if it will support 1000px width without creating a horizontal scroll in the bottom" (sorry for not explaining this in the beginning)

What about IE7 for example?

I don't want to get the bottom scroll...

I know it might look bad on some 1024 screens if there is no space on the side.

I am adding an example so you better will understand:

The reason for asking is beceause I don't want to get a horizontal scroll on my website in widly used browsers. I don't have any old IE version installed, so I cant test it myself.

Note that the 3000px height div will cause a vertical scroll to the right... So the "browser window width" have to be at least 1000px in width for it to work (1024 minus right scroll (minus left border))

<!DOCTYPE html>
<html>
<head>
<title>Untitled Document</title>
</head>
<body style="margin:0">
<div style="width:1000px;height:3000px">Will this div creat a horizontal scroll bar in any widly used browser, with window size of 1024 x 768px <? What about Internet Explorer 7 and Internet Explorer 8?</div>
</body>
</html>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

枫林﹌晚霞¤ 2024-12-25 15:38:27

他们都这样做,这更多的是用户拥有哪些显示器的问题。大多数网站使用 960px 宽,主要是因为它可以很好地与 1024 宽的显示器配合使用,而且它可以被许多因素整除,从而更容易实现平衡的多列布局。

您可以安全地达到大约 980 像素。

They all do, it's more of a matter of which monitors users have. Most sites use 960px-wide, mainly because it works well with 1024-wide monitors, and it is divisible by many factors, making it east to have balanced multi-column layouts.

You can safely go up to about 980px.

蔚蓝源自深海 2024-12-25 15:38:27

我认为 960 像素是广泛接受的网站布局标准,但 980 也很常见。 1000 可能太多了几个像素。

I think 960 pixels is the widely accepted standard for website layouts, but 980 is also common. 1000 may be a few pixels too many.

夏天碎花小短裙 2024-12-25 15:38:27

事实上,您使用哪种浏览器并不重要,重要的是屏幕分辨率和浏览器窗口的大小。

在 1024x768 分辨率下,宽度 = 980px(并且没有侧边距),它不会创建滚动条

In fact doesnt matter which browser you are using, but the screen resolution and the size of the browser window.

At 1024x768 resolution, with width = 980px (and no side padding) it will not create scrollbar

望笑 2024-12-25 15:38:27

所有浏览器都支持您想要的任何宽度。

您真正关心的是屏幕分辨率和当前浏览器窗口的实际视口宽度。例如,我的 2 个屏幕为我提供了 1920+1920=3840 像素的有效屏幕宽度,但我从不最大化浏览器,因此视口更像是 800 像素宽。
(我讨厌 960px 网格)

请参阅文章 响应式网页设计 进行讨论真正的宽度自适应布局。


答案不会随着您对问题的更新而改变。答案仍然是:

All browsers support whatever width you want.

如果您有足够的屏幕空间使浏览器窗口足够宽,它将显示任何宽度的页面而没有滚动条。

例如 IE7 怎么样?

由于我可以将 IE 7 窗口(或 IE 8 或 9)拉伸至 3000 像素宽,因此 IE 7 将显示 1000 像素宽的页面,而没有水平滚动条。因此,IE 7“支持”1000px的宽度而没有滚动条。从这个意义上说,所有浏览器都支持您想要的任何宽度。

All browsers support whatever width you want.

What you really care about is screen resolution and the actual viewport width of the current browser window. For example, my 2 screens gives me an effective screen width of 1920+1920=3840 pixels, but I never maximize my browser so the viewport is more like 800 pixels wide.
(I hate 960px grids)

See the article Responsive Web Design for discussion of making a truly width-adaptive layout.


The answer doesn't change with your update to the question. The answer is still:

All browsers support whatever width you want.

If you have enough screen space available to make a browser window wide enough, it will display any width page without scrollbars.

What about IE7 for example?

Since I can stretch my IE 7 window (or IE 8 or 9) to be 3000px wide, IE 7 will display a 1000px wide page without a horizontal scrollbar. Therefore, IE 7 "supports" a width of 1000px without a scrollbar. In that sense, All browsers support whatever width you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文