CSS - div之overflow:scroll

[color=green][b]Definition[/b][/color]

The overflow property specifies what happens if content overflows an element's box.


[color=green][b]Usage[/b][/color]

[color=brown]Default value:[/color] visible
[color=brown]Inherited:[/color] no
[color=brown]Version:[/color] CSS2
[color=brown]JavaScript syntax:[/color] object.style.overflow="scroll"


[color=green][b]Property Values[/b][/color]

[b]Value[/b] [b]Description[/b]
[color=blue]visible[/color] The overflow is not clipped.
It renders outside the element's box.
This is [color=green]default [/color]

[color=blue]hidden[/color] The overflow is clipped,
and the rest of the content will be invisible

[color=blue]scroll[/color] The overflow is clipped,
but a scroll-bar is added to see the rest of the content

[color=blue]auto[/color] If overflow is clipped,
a scroll-bar should be added to see the rest of the content

[color=blue]inherit[/color] Specifies that the value of the overflow property
should be inherited from the parent element.


[color=brown]如果 只有文本超出div宽度时,才显示scroll,
则设为 : overflow : auto[/color]


[color=green][b]当然,还可以指定:[/b][/color]

overflow-x :auto;
overflow-y :auto;


[url]http://www.w3schools.com/cssref/pr_pos_overflow.asp[/url]


-
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值