可变长度滚动< div>或< iframe>? [英] Variable length scrolling <div> or <iframe>?

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

问题描述

我使用< iframe>取得了巨大成功溢出-y设置为auto。我用

可以使用< iframe>获得类似的外观标签。


但是......在所有情况下我都需要有固定的高度。有没有办法把

标记放在HTML< TD>内。并且具有相同类型的滚动效果。


这将允许我填充屏幕并在调整大小时更改滚动

框的大小。


提前致谢。


Jim

I have had great success with using <iframe> with overflow-y set to auto. I
can get a similar look with the <iframe> tag.

BUT... In all cases I need to have fixed heights. Is there a way to put
either tag inside an HTML <TD> and have the same kind of scrolling effect.

This would allow me to fill the screen and have the size of the scrolling
box change on resize.

Thanks in advance.

Jim

推荐答案

< ; table height =" 100%"宽度= QUOT; 100%QUOT; CELLSPACING = QUOT; 0" cellpadding =" 0">

< tr>

< td>

< div style =" width:100 %;身高:100%;溢出:自动; border:

1px solid red">

包含文本的div,其值为100%的持有块元素

size并且还允许滚动屏幕内容。

包含文本的div,其值为100%的保持块元素

大小,并允许滚动屏幕内容。

一个包含文本的div,其值为100%的保持块元素

大小,并允许滚动屏幕内容。

一个包含文本的div,它将在保持块元素的100%处显示

大小,并允许滚动屏幕内容。 < / div>

< / td>

< / tr>

< / table>


边框添加效果。


克里斯。


Jim M <一个******** @ discussions.microsoft.com>在消息中写道

新闻:OH ************** @ TK2MSFTNGP09.phx.gbl ...

我取得了巨大的成功使用< iframe>溢出-y设置为auto。我用

可以使用< iframe>获得类似的外观标签。


但是......在所有情况下我都需要有固定的高度。有没有办法把

标记放在HTML< TD>内。并且具有相同类型的滚动效果。


这将允许我填充屏幕并在调整大小时更改滚动

框的大小。


提前致谢。


Jim

<table height="100%" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<div style="width: 100%; height: 100%; overflow: auto; border:
1px solid red">
A div with text in it that will stat at 100% of the holding block element
size and also allow scrolling for off screen content.
A div with text in it that will stat at 100% of the holding block element
size and also allow scrolling for off screen content.
A div with text in it that will stat at 100% of the holding block element
size and also allow scrolling for off screen content.
A div with text in it that will stat at 100% of the holding block element
size and also allow scrolling for off screen content. </div>
</td>
</tr>
</table>

Border added for effect.

Chris.

"Jim M" <an********@discussions.microsoft.com> wrote in message
news:OH**************@TK2MSFTNGP09.phx.gbl...
I have had great success with using <iframe> with overflow-y set to auto. I
can get a similar look with the <iframe> tag.

BUT... In all cases I need to have fixed heights. Is there a way to put
either tag inside an HTML <TD> and have the same kind of scrolling effect.

This would allow me to fill the screen and have the size of the scrolling
box change on resize.

Thanks in advance.

Jim


" Jim M" <一个******** @ discussions.microsoft.com> schrieb
"Jim M" <an********@discussions.microsoft.com> schrieb
使用< iframe>我取得了很大的成功溢出-y设置为
auto。我可以使用< iframe>获得类似的外观标签。

但是...在所有情况下我都需要有固定的高度。有没有办法将标签放在HTML< TD>内?并且具有相同类型的滚动效果。

这将允许我填充屏幕并在调整大小时更改
滚动框的大小。
I have had great success with using <iframe> with overflow-y set to
auto. I can get a similar look with the <iframe> tag.

BUT... In all cases I need to have fixed heights. Is there a way to
put either tag inside an HTML <TD> and have the same kind of
scrolling effect.

This would allow me to fill the screen and have the size of the
scrolling box change on resize.




我不知道你的意思。我认为它不是VB.NET语言相关的

问题。

-

Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html



I don''t know what you mean. I think it is not a VB.NET language related
question.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html


" Chris Barber" < CH *** @蓝canoe.co.uk.NOSPAM>写在

新闻:#X ************** @ TK2MSFTNGP12.phx.gbl:
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in
news:#X**************@TK2MSFTNGP12.phx.gbl:
< table高度= QUOT; 100%QUOT;宽度= QUOT; 100%QUOT; CELLSPACING = QUOT; 0" cellpadding =" 0">
< tr>
< td>
< div style =" width:100%;身高:100%; overflow:auto;
border:
1px solid red">
包含文本的div,其值为100%的保持块
元素大小,也允许滚动关闭屏幕内容。
一个带有文本的div,它将以100%的保持块
元素大小进行统计,并允许滚动屏幕内容。
包含文本的div这将是保持块元素大小的100%的统计数据,并且还允许滚动屏幕内容。
其中包含文本的div将保留块的100%
元素大小,也允许滚动屏幕内容。
< / div>
< / td>
< / tr>
< / table>

边框添加效果。
<table height="100%" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<div style="width: 100%; height: 100%; overflow: auto;
border:
1px solid red">
A div with text in it that will stat at 100% of the holding block
element size and also allow scrolling for off screen content.
A div with text in it that will stat at 100% of the holding block
element size and also allow scrolling for off screen content.
A div with text in it that will stat at 100% of the holding block
element size and also allow scrolling for off screen content.
A div with text in it that will stat at 100% of the holding block
element size and also allow scrolling for off screen content.
</div>
</td>
</tr>
</table>

Border added for effect.




这仅适用于IE,但不适用于Mozilla浏览器。 (在mozilla中,

滚动条永远不会出现,因为高度为100%的元素似乎会自动增长



谁知道如何以统一的方式做到这一点?


Allie



This only works in IE, but not in Mozilla browsers. (in mozilla the
scrollbar never appears, because the element with height:100% seems to
grow automatically.)

Anyone knows how to do this in a uniform way?

Allie


这篇关于可变长度滚动&lt; div&gt;或&lt; iframe&gt;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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