将固定div固定在可滚动的div上 - 无法滚动

时间:2017-02-28 14:22:52

标签: css html5 scroll

我想要滚动一个div的固定div。当我的鼠标在固定div上时,我无法滚动div。反正有吗?

#scroll {
  width:660px;
  height:300px;
  overflow-y:scroll
}

#fixed {
  width:100%;
  height:100px;
  padding:20px;
  box-sizing: border-box;
  position:fixed;
  bottom:0px;
  background:red;

}

http://codepen.io/garethj/pen/PpPmdJ

2 个答案:

答案 0 :(得分:2)

添加pointer-events:none;,即使您的光标位于scroll

,也可以#fixed div #fixed { width:100%; height:100px; padding:20px; box-sizing: border-box; position:fixed; bottom:0px; background:red; pointer-events:none; /*Add this*/ }
def get_colors(*args, **kwargs):
    colors = Color.objects.none()
    for paint in Paint.objects.all():
        if paint.color and paint.color not in colors:
            colors.add(paint.color)
    return colors

答案 1 :(得分:0)

width以下width: calc(100% - 16px); 声明:

$options        = array(
..
    CURLOPT_COOKIESESSION   => TRUE
..);

curl_setopt_array($ch, $options);
$result = curl_exec($ch);