“覆盖"功能是什么? “溢出"的值财产? [英] What is the function of "overlay" value of "overflow" property?
问题描述
我无法理解重叠式广告"和"汽车". 重叠广告"与自动"广告有相同的作用吗?
I am unable to understand the difference between "overlay" & "auto". Does "overlay" does the same work as "auto"?
推荐答案
唯一的区别是overflow: overlay
仅受-Webkit浏览器支持,是非标准化的,并且允许内容扩展到滚动条下方-而overflow: auto
不允许内容在滚动条下方扩展,如果看起来它将占据所需的空间并相应地(垂直或水平)移动内容.
The only difference is that overflow: overlay
is only supported by -Webkit browsers, is non-standardized, and allows the content to extend beneath the scrollbar - whereas overflow: auto
will not allow the content to extend beneath the scrollbar, if it appears it'll occupy the space required and shift the content accordingly (either vertically or horizontally).
p {
display: inline-block;
width: 12em;
height: 5em;
border: dotted;
}
p.overflow-auto { overflow: auto; /* append scrollbars if necessary and shift content accordingly to accommodate */ }
p.overflow-overlay { overflow: overlay; /* append scrollbars if necessary and overlay over/above content */ }
<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>
上面的代码片段演示了以下差异:
The above snippet demonstrates the difference as follows:
p.overflow-auto { overflow: auto; /* append scrollbars if necessary and shift content accordingly to accommodate */ }
p.overflow-overlay { overflow: overlay; /* append scrollbars if necessary and overlay over/above content */ }
这篇关于“覆盖"功能是什么? “溢出"的值财产?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!