CSS: overflow-y: scroll; overflow-x: visible

前端 未结 2 1537
半阙折子戏
半阙折子戏 2021-02-19 02:24

See the following post for a picture highlighting my question and a potential solution:

CSS overflow-y:visible, overflow-x:scroll

However, this strategy breaks w

2条回答
  •  旧巷少年郎
    2021-02-19 02:47

    I guess you should use position:absolute instead of position:fixed.

    .parent { overflow-y:scroll; width:100%; height:100px; }
    .child { position:relative; }
    .child .child-menu { position: absolute; left: 80px;width:200px; top:0px; border: 1px solid black; background-color: green; display: none; }
    .child:hover .child-menu { display: block; }
    

    Fiddle demo, http://jsfiddle.net/68fBE/2/

提交回复
热议问题