如何理解 MDN 上描述的关于 box-shadow 的插值?
How understand interpolation about box-shadow described on MDN?
新年快乐!
当我阅读 CSS 属性 box-shadow 的描述时,我无法弄清楚 this page 上的插值部分是什么意思。
我用谷歌搜索了这个但仍然很困惑。
是关于 CSS 动画的吗?
能否请你帮忙?谢谢
如果可能,请提供一些代码示例。
让我来消化一下这段废话
Each shadow in the list (treating none as a 0-length list) is
interpolated via the color (as color) component, and x, y, blur, and
(when appropriate) spread (as length) components.
列表中的每个阴影都是使用颜色、x、y、模糊和扩散值进行插值(各种含义,但通常是:混合、混合)。
For each shadow, if both input shadows are or are not inset, then the
interpolated shadow must match the input shadows in that regard. If
any pair of input shadows has one inset and the other not inset, the
entire shadow list is uninterpolable.
我们只能插入(混合,混合任何)相同类型的阴影,无论是否嵌入,我们不能将嵌入阴影与非嵌入阴影混合
If the lists of shadows have different lengths, then the shorter list
is padded at the end with shadows whose color is transparent, all
lengths are 0, and whose inset (or not) matches the longer list.
我不确定你最终会得到一个不同长度的列表,但据我所知,如果我们以某种方式最终得到一个不同长度的列表,浏览器将通过以下方式对此进行补偿添加透明阴影,以便它可以插入(混合、混合等)
TL;DR
它只是解释了浏览器插入多个阴影的步骤,与我所看到的动画无关。
别担心,让浏览器来做吧!
新年快乐!
当我阅读 CSS 属性 box-shadow 的描述时,我无法弄清楚 this page 上的插值部分是什么意思。 我用谷歌搜索了这个但仍然很困惑。 是关于 CSS 动画的吗? 能否请你帮忙?谢谢
如果可能,请提供一些代码示例。
让我来消化一下这段废话
Each shadow in the list (treating none as a 0-length list) is interpolated via the color (as color) component, and x, y, blur, and (when appropriate) spread (as length) components.
列表中的每个阴影都是使用颜色、x、y、模糊和扩散值进行插值(各种含义,但通常是:混合、混合)。
For each shadow, if both input shadows are or are not inset, then the interpolated shadow must match the input shadows in that regard. If any pair of input shadows has one inset and the other not inset, the entire shadow list is uninterpolable.
我们只能插入(混合,混合任何)相同类型的阴影,无论是否嵌入,我们不能将嵌入阴影与非嵌入阴影混合
If the lists of shadows have different lengths, then the shorter list is padded at the end with shadows whose color is transparent, all lengths are 0, and whose inset (or not) matches the longer list.
我不确定你最终会得到一个不同长度的列表,但据我所知,如果我们以某种方式最终得到一个不同长度的列表,浏览器将通过以下方式对此进行补偿添加透明阴影,以便它可以插入(混合、混合等)
TL;DR
它只是解释了浏览器插入多个阴影的步骤,与我所看到的动画无关。 别担心,让浏览器来做吧!