使用 Windows XP 主题时垂直滚动条不起作用(非经典)

发布于 2024-07-22 20:32:51 字数 339 浏览 4 评论 0原文

这听起来可能很疯狂,直到我亲眼所见我才相信。

当您单击滚动条或箭头之间的空间时,垂直滚动条不会滚动。 您必须拖动该栏才能使其滚动。 这种情况只发生在丑陋的默认主题中(不是 Windows 经典主题)。

滚动条后面有一些沉重的 JavaScript,可以驱动页面上另一个 DIV 的滚动。

以前有人遇到过这种情况吗? 到底为什么主题会影响 IE 的渲染?! 只有IE!

编辑: 当您使用“非经典”XP 主题(默认的丑陋主题)时,就会出现此问题。 切换主题不会导致此问题,但如果您从默认主题切换到经典主题,它确实可以解决此问题。

This may sound crazy, and i didnt believe it until i saw it for myself.

The vertical scroll bar does not scroll when you click in the space between the scroller or the arrows. You have to drag the bar to get it to scroll. This only happens in the ugly default theme (not windows classic).

The scroll bar has some heavy javascript behind it that drive scrolling of another DIV on the page.

Has anyone even encountered this before? Why the heck does the theme influence IE's rendering?! Only IE!

edit:
this problem happens when you are in "non-classic" XP theme (the default ugly one). switching themes does not cause this, but it does fix it if you switch to classic from the default.

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

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

发布评论

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

评论(4

一桥轻雨一伞开 2024-07-29 20:32:52

我刚刚在 XP 主题中的 IE7 中的垂直滚动条遇到了同样的问题。 经过多次实验,我终于找到了解决办法。 我不知道这个解决方案适合您的情况。

带有渲染滚动条的容器(下例中的 div#scroll)必须大于 18px。 任何低于该值的数字都会导致垂直条被禁用。

<div id="scroll">
     <div id="fill">
     </div>
</div>

样式表,例如:

#fill{
    width: 1px;
    height: 1000px;
}

#scroll {
    width: 18px; /* This has to be larger than or equal to 18. */
    height: 50px;
    overflow-y: scroll;
}

谢谢,
优雅

I just had the same problem with vertical scrollbar in IE7 within the XP theme. After many experiments, I finally found the solution to it. I don't know this solution fits your case.

The container (div#scroll in the example below) with the rendered scrollbars must be larger than 18px. Any number below that will cause the vertical bar disabled.

<div id="scroll">
     <div id="fill">
     </div>
</div>

The stylesheet, for example:

#fill{
    width: 1px;
    height: 1000px;
}

#scroll {
    width: 18px; /* This has to be larger than or equal to 18. */
    height: 50px;
    overflow-y: scroll;
}

Thanks,
Grace

栀子花开つ 2024-07-29 20:32:52

为了避免某些 Windows 限制,IE 重新实现了网页上几乎所有可见的控件。

旧事新事:无窗口控件并不神奇< /a>

<摘录>

Internet Explorer 团队重新实现了网页所需的所有控件。 他们有自己的无窗口复选框控件,无窗口列表框控件,
无窗口的编辑框等等。 除了重现窗口控件的所有功能之外,Internet Explorer 人员还必须重现 Internet Explorer 的“外观”。
窗口控件,精确到最后一个像素。 (像这样的函数
DrawThemeBackgroundDrawFrameControl 在这里证明非常有用。)

如果我没记错的话,唯一仍然处于窗口状态的元素是 <选择> 元素

如果你眯着眼睛,你会发现一些他们没有完全解决的地方。 例如,如果右键单击文本框,则会缺少“从右到左阅读顺序”和“插入 Unicode 控制字符”等选项。 再举一个例子,请注意,当您将鼠标悬停在 IE 上时,滚动条不会亮起。

如果没有看到实现页面的代码,我猜这是“IE 的控件不是本机的”的另一种表现。

如果您与 Microsoft 签订了支持合同,我建议您通过该渠道向他们投诉; 如果没有,请查看 microsoft.public.internetexplorer.general 新闻组。 回到 IE6,他们用 KB824145 破坏了滚动条,并用 KB832894,所以这些问题并不是以前没有发生过并得到解决。

In order to avoid certain Windows restrictions, IE re-implements almost all the controls visible on a web page.

The Old New Thing : Windowless controls are not magic

<excerpt>

The Internet Explorer team went and reimplemented all of the controls that a web page would need. They have their own windowless checkbox control, a windowless listbox control,
a windowless edit box, and so on. In addition to reproducing all the functionality of the windowed controls, the Internet Explorer folks also had to reproduce the "look" of the
windowed controls, down to the last pixel. (Functions like
DrawThemeBackground and DrawFrameControl prove extremely helpful here.)

If I recall correctly, the only element that is still windowed is the <SELECT> element.

If you squint, you can see some places where they didn't quite nail it. For example, if you right-click in a text box, options like "Right to left reading order" and "Insert Unicode control character" are missing. As another example, notice that IE's scroll bars do not light up when you hover over them.

</excerpt>

Without seeing the code implementing your page, I would guess that this is another manifestation of "IE's controls don't act native".

If you have a support contract with Microsoft, I'd suggest complaining to them through that channel; if not, see if you get any responses in the microsoft.public.internetexplorer.general newsgroup. Back in IE6, they broke the scrollbar with KB824145 and fixed it with KB832894, so it's not like theses sorts of problems haven't happened and been resolved before.

云淡风轻 2024-07-29 20:32:52

首先,我首先要说的是 IE 是一个糟糕的浏览器,在某些情况下,您在开发 Web 应用程序时无法控制问题。

在这种情况下,我没有遇到这样的问题,谷歌搜索也没有找到任何关于这个主题的信息。 我想说这一定是你的代码中的某些东西导致了一个奇怪的错误。 它很可能不会破坏很多系统,因此除非它是非常重要的应用程序(销售、政府......),否则您可以保留这种方式。

这么看:是谁把窗户的风格改成经典的? 极客们。 极客们都用IE吗? 不。^^ ...开玩笑,但不是真的。

如果这很重要,我需要查看您的实际代码“滚动条后面有一些沉重的 JavaScript,可驱动页面上另一个 DIV 的滚动。

First, I'll start saying that IE is a terrible browser and in some cases you don't have control over issues while developing a web application.

In that case I haven't encounter such an issue and a Google search don't pull anything on the subject. I'd say it must be something in your code that lead to a weird bug. Most likely it won't break in a lot of systems, so unless it's a very important application (sales, government...) you could leave it that way.

Look at it that way: who change the style of windows to classic? Geeks. And do geeks use IE? No. ^^ ... Joking, but not really.

If it's important I'll need to take a look at your actual code for "The scroll bar has some heavy javascript behind it that drive scrolling of another DIV on the page."

抠脚大汉 2024-07-29 20:32:51

时有帮助吗

<!--[if IE]><meta http-equiv="MSThemeCompatible" content="no"><![endif]-->

添加到页面源 ? 当我启用非经典主题时,它可以很好地解决 IE 中的故障。 请注意,条件注释的存在是为了使 Firefox 不会解析该标记(因为它有时会弄乱 Firefox 中的滚动条)。

Does it help when you add

<!--[if IE]><meta http-equiv="MSThemeCompatible" content="no"><![endif]-->

to your page source? It worked well to work around glitches in IE when a non-classic theme is enabled for me. Note that the conditional comments are there so that firefox does not parse the tag (because it will screw up scrollbars in firefox sometimes).

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