javascript - What is alternate for overflow:overlay css property in mozilla and internet explorer browsers - Stack Overflow

overflow:overlay is working fine in chrome and safari. This property isn't available in IE and Moz

overflow:overlay is working fine in chrome and safari. This property isn't available in IE and Mozilla browsers. I need the scroll bar pane to be visible always.

overflow:overlay is working fine in chrome and safari. This property isn't available in IE and Mozilla browsers. I need the scroll bar pane to be visible always.

Share Improve this question edited Apr 24, 2019 at 6:39 codejockie 10.9k4 gold badges48 silver badges57 bronze badges asked Feb 27, 2018 at 23:14 koushik uikoushik ui 911 gold badge1 silver badge3 bronze badges 3
  • 2 my advice: don't use deprecated functionality ... according to MDN This deprecated API should no longer be used, but will probably still work - though, it only ever "worked" in webkit – Jaromanda X Commented Feb 27, 2018 at 23:26
  • Check out stackoverflow./questions/43050434/… – omukiguy Commented Feb 28, 2018 at 3:49
  • Official Mozilla Doc – law_81 Commented Feb 28, 2018 at 12:48
Add a ment  | 

1 Answer 1

Reset to default 1

As mentioned by in the ments above and in the doc: https://developer.mozilla/en-US/docs/Web/CSS/overflow

This deprecated API should no longer be used, but will probably still work.

However, since you mentioned:

I need the scroll bar pane to be visible always.

You can use the value overflow: scroll, and you will always have the scrollbar whether or not any content is actually clipped, and this will prevent the content from moving and changing your layout, for example:

div {
  border: 1px solid black;
  float: left;
  height: 100px;
  margin: 10px;
  overflow: scroll;
  width: 200px;
}
<div>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dictum ligula vel dolor eleifend, vel interdum risus tristique. Nullam laoreet sed metus at aliquam. Aliquam ornare sagittis nibh in volutpat. Sed dolor orci, viverra ut lectus ac, modo faucibus nisl. Proin molestie felis ligula, ullamcorper sollicitudin lacus modo eu. Curabitur sit amet cursus ante. Aliquam vel leo et justo luctus semper eget sit amet turpis. Aenean ac rhoncus dolor. Etiam ut euismod arcu, vehicula suscipit ex.   Donec nec posuere sapien. Phasellus accumsan sem nec nibh congue, ut porttitor diam convallis. Nulla ac tempus arcu. Suspendisse at lorem est. Nullam sit amet modo felis. Quisque ac mollis metus. Duis varius eleifend sem, eget venenatis ante mattis
  at.
</div>

<div>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse dictum ligula vel dolor eleifend, vel interdum risus tristique. 
</div>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745267140a4619525.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信