The only difference is that it is overflow: overlay
supported only by -Webkit browsers, is non-standardized and allows content to expand under the scroll bar - while it overflow: auto
does not allow content to expand under the scroll bar if it seems to take up space and change the content accordingly (vertically or horizontally).
p {
display: inline-block;
width: 12em;
height: 5em;
border: dotted;
}
p.overflow-auto { overflow: auto; }
p.overflow-overlay { overflow: overlay; }
<p class="overflow-auto">overflow: auto
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.</p>
<p class="overflow-overlay">overflow: overlay
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.</p>
Run codeHide result:
p.overflow-auto { overflow: auto; }
p.overflow-overlay { overflow: overlay; }