css大盒子套小盒子怎么写,使用css如何将一个小盒子始终固定在大盒子的底部,大盒子高度为100%,请教。...

看下我有没有猜错你的意思;

//大容器100% //滚动区域

.container{

position:relative;

height:100%;

overflow:hidden;

/*.....*/

}

.wrapper{

position:relative;

height:auto;

/*.....*/

}

.content{

position:relative;

height:auto;

/*....*/

}

.refresh{

position:relative;

float : left;

width:100%;

height:40px;

/*......*/

}

.scrollBox{

position:absolute;

height:100%;

right:0px;

top:0px;

/*因为scrollBox的父元素是container,而且改变的是content,所以这里不会发生改变*/

}

.bar{

position:relative;

height : /*通过js计算并更新*/;

}

这里你可以让wrapper和content的高度一样,也就是position都为relative,refresh这里使用float,然后设定好宽高。因为refresh这里已经脱离了文档流,所以不会影响wrapper的高度,container设定为overflow:hidden。 当你往上拉过头的时候,refresh会自然而然的上来。不知道这样行不行。