可见的滚动条 [英] Visible scrollbars

查看:53
本文介绍了可见的滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个弹出窗口,如果这个窗口是粉碎滚动条是

可见。

有没有可用的JavaScript所以我可以检查滚动条是否

可见页面(右侧和底部)?

然后我可以自动调整窗口大小,这样它就不会显示(直到最大值

size)。

解决方案



GTi napisal(a):

我有一个弹出窗口,如果这个窗口是粉碎滚动条是可见的。
是否有任何JavaScript可用,所以我可以检查页面上是否可见滚动条(右侧和底部)那边?
然后我可以自动调整窗口的大小,这样它就不会显示(直到最大尺寸)。




当然是其他人将提供一些完全符合你想要的答案(可能基于scrollHeight,scrollTop等)但现在我的

答案是样式表中的BODY {overflow:hidden;} 。


bw****@gmail.com 写道:< blockquote class =post_quotes> GTi napisal(a):

我有一个弹出窗口,如果这个窗口是粉碎滚动条是可见的。
有没有可用的JavaScript,所以我可以检查页面上是否可以看到滚动条(右侧和下侧)?
然后我可以自动调整窗口的大小,这样它就不会显示(直到最大值
size)。



甚至不尝试它。用户可以通过单击

按键或鼠标点击来最大化他们的窗口。如果他们的窗户被设置为一定的大小,那就是因为他们想要那样的话。


当然其他人会提供一些答案什么你想要


不,大多数人根本不在乎弹出窗口。试图调整大小的脚本

只是一个进一步的烦恼,用户可能会阻止

偏好设置。


(可能基于scrollHeight,scrollTop等)但是现在我的
回答是样式表中的BODY {overflow:hidden;}。




所以用户可以'' t访问溢出 - 猜测是否适合

小于预期的窗口或监视器。

-

Rob


GTi写道:

我有一个弹出窗口,如果这个窗口是粉碎滚动条是可见的。然后我可以自动调整窗口的大小,这样它就不会显示(直到最大值
大小)。




你还没有想到这一点。例如,考虑用户具有

a文本缩放级别,这使得无法在当前屏幕上显示没有

滚动条的窗口 - 如果有(弹出窗口)窗口,和iff

有滚动条,由图形用户界面提供。

PointedEars


I have a popup window, If this window is to smaal the scrollbars is
visible.
Is there any JavaScript available so I can check if the scrollbars is
visible on page (right and bottom side)?
Then I can auto resize the window so it dosen''t show (until a maximums
size).

解决方案


GTi napisal(a):

I have a popup window, If this window is to smaal the scrollbars is
visible.
Is there any JavaScript available so I can check if the scrollbars is
visible on page (right and bottom side)?
Then I can auto resize the window so it dosen''t show (until a maximums
size).



Certainly others will provide some answer that does exactly what you
want (possibly based on scrollHeight, scrollTop etc) but for now my
answer was BODY {overflow: hidden;} in stylesheets.


bw****@gmail.com wrote:

GTi napisal(a):

I have a popup window, If this window is to smaal the scrollbars is
visible.
Is there any JavaScript available so I can check if the scrollbars is
visible on page (right and bottom side)?
Then I can auto resize the window so it dosen''t show (until a maximums
size).


Don''t even attempt it. Users can maximise their windows with a single
keystroke or mouse click. If their windows are set to a certain size,
it''s because they want them that way.

Certainly others will provide some answer that does exactly what you
want
Nah, most don''t care for pop-ups at all. Scripts that try to resize
them are just a further annoyance and may well be prevented by user
preference settings anyway.

(possibly based on scrollHeight, scrollTop etc) but for now my
answer was BODY {overflow: hidden;} in stylesheets.



So users can''t access the overflow - guess that serves them right for
having a smaller than expected window or monitor.
--
Rob


GTi wrote:

I have a popup window, If this window is to smaal the scrollbars is
visible.
Is there any JavaScript available so I can check if the scrollbars is
visible on page (right and bottom side)?
Then I can auto resize the window so it dosen''t show (until a maximums
size).



You have not thought this through. Consider, for example that users have
a text zoom level that makes it impossible to display the window without
scrollbars on the current screen -- iff there is a (popup) window, and iff
there are scrollbars, provided by a graphical user interface.
PointedEars


这篇关于可见的滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆