如何扩展它以便它可以在一个可滚动的div上工作?
应用height: 100px; overflow: auto;
会导致.fadeout
div最终位于滚动区域的底部。
js我目前拥有的内容:http://jsfiddle.net/6k3vV/165/
答案 0 :(得分:1)
http://jsfiddle.net/6k3vV/167/
这里。需要父母也有亲戚
.fadeout {
bottom: 0;
height: 4em;
background: linear-gradient(
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 100%
);
position: absolute;
width: 100%;
}
section {
height: 100px;
overflow: auto;
}