首页 > 解决方案 > 使用绝对位置的文本剪辑

问题描述

我正在尝试使用background-clip: text;with position: absolute;。但我什至在 W3C 规范中都找不到有关它的信息。结构如下所示:

 <div> <!-- The element with text-clipped background -->
    <span>Text</span> <!-- position: absolute; -->
 </div>

但是当我在 Firefox 或 Chrome 中渲染它时,文本消失了(因为我必须使用透明颜色来使用剪辑)。

是否有可能做到这一点?

标签: css

解决方案


推荐阅读