“覆盖"功能是什么? “溢出"的值财产? [英] What is the function of "overlay" value of "overflow" property?

查看:88
本文介绍了“覆盖"功能是什么? “溢出"的值财产?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法理解重叠式广告"和"汽车". 重叠广告"与自动"广告有相同的作用吗?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆