我有这样的布局:
+---------------------------------+
| #container |
|+-------------------------------+|
|| #top ||
|| This changes height ||
|| dynamically ||
|+-------------------------------+|
|+-------------------------------+|
|| #mid ||
|| ||
|| This changes height ||
|| dynamically ||
|+-------------------------------+|
| |
| |
| |
| |
| |
|+-------------------------------+|
|| #bot ||
|| This has fixed height ||
|| ||
|+-------------------------------+|
+---------------------------------+
当top或mid被放大时,它们会从容器中溢出。我怎样才能做到,这样他们就不会越过bot?当他们想要溢出时,内部 div 应该会出现一个滚动条(又名溢出自动)
CSS
#container{
position: absolute;
} //Container's container has position:relative.
#bot{
position: absolute;
bottom: 0px;
}