css - 使用绝对位置的文本剪辑
问题描述
我正在尝试使用background-clip: text;
with position: absolute;
。但我什至在 W3C 规范中都找不到有关它的信息。结构如下所示:
<div> <!-- The element with text-clipped background -->
<span>Text</span> <!-- position: absolute; -->
</div>
但是当我在 Firefox 或 Chrome 中渲染它时,文本消失了(因为我必须使用透明颜色来使用剪辑)。
是否有可能做到这一点?
解决方案
推荐阅读
- knex.js - 是否有等效于 knex.pluck() 的方法可以返回多列的值?
- git - 为什么我在 Android Studio 3.3.1 中执行 Checkout revision 和 Commit 操作时会收到“Detached Head”消息?
- android-studio - 在 android studio 项目中 access$ 是什么意思?
- api - Trello API:如何在请求 URI 中使用“之前”和“之后”操作过滤器
- javascript - 在javascript中展平嵌套对象
- java - 在java中从同一个文件中读取两个矩阵
- python - 使用和不使用 GPU 进行编程的语法差异?
- python - 读取 excel 文件得到 TypeError:int() 参数必须是字符串,而不是 Pandas 中的 '_NoValueType'
- ruby - 希望将文件中的信息转换为哈希 Ruby
- python - python pickle,在重新加载时不存储列表元素