< DIV>溢出:自动不显示滚动条,直到调整大小 [英] <div> overflow:auto does not show scrollbar until resize

查看:168
本文介绍了< DIV>溢出:自动不显示滚动条,直到调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的表单上有一个元素,如下所示:

I have a element on my form that looks like this:

<div style="overflow-y:auto;overflow-x:hidden;height:100%;width:100%">

在IE7第一次渲染时,没有滚动条。但是,如果我调整页面大小(即使只有1个像素),滚动条也会正常显示。

In IE7 when the page first renders, there are no scrollbars. However, if I resize the page (even just 1 pixel) the scroll bars appear properly.

有什么我可以做的,这样当页面第一次显示时,滚动条就可以正常显示了吗?

Is there something I can do so that the scrollbars show properly when the page first displays?

推荐答案

如果您始终需要滚动条,请将overflow-y设置为滚动。

Set overflow-y to "scroll" if you always want a scrollbar.

这篇关于&LT; DIV&GT;溢出:自动不显示滚动条,直到调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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