CSS 内容的图像矩阵样式转换?

发布于 2024-12-23 07:23:58 字数 478 浏览 5 评论 0原文

因此,我正在研究一个特定的 Web 浏览器应用程序,它要求我将颜色表示为直 Alpha 通道,并将黑白 Alpha 通道作为单独的元素。 (两种类型的示例

我很久以前就知道了,IE 支持一些不正当的过滤器选项,但由于我正在进行 css3 转换,我需要它才能工作在现代浏览器中,最好是 Chrome。

基本上我想做的是应用 CSS 变换的元素,特别是最有可能的旋转,然后我想将其复制到另一个具有黑色的同等大小的元素。 / 应用白色转换。另一个好处是将原始元素设置为使用直接 alpha,但我现在

还没有找到任何可以开始调查的路线,如果你有的话,我可以。我会非常感激,最后的手段就是开始做事。在 WebGL 或 Canvas 中并修改那里的输出。

So I'm looking at a specific application for a web browser which requires me to express color as a straight alpha channel with a black and white alpha channel as a separate element. (an example of both types

I know many moons ago, IE supported some perverse filter options, but since I'm doing css3 transforms, I need this to work in a modern browser, preferably Chrome.

Basically what I'd like to do is have an element with CSS transforms applied, specifically rotation most likely, then I'd like to take that and copy it to another equivalently sized element which has the black / white transformation applied. An additional bonus would be setting the original element to use straight alpha, but I can live without that for now.

I haven't been able to find any routes with which to start investigating. If you have one, I'd be super grateful. My last resort is to start doing things in WebGL or Canvas and modifying the output there.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

宁愿没拥抱 2024-12-30 07:23:58

使用绝对定位和 z 索引将两个或三个不同的元素堆叠在一起?这将需要您保存两个不同的图像,我猜您正在试图避免这种情况。

Two or three different elements stacked on top of each other using absolute positioning and z-index? This would require you to save two different images which I'm guessing you're trying to avoid.

Spring初心 2024-12-30 07:23:58

您可以进行 CSS 3D 转换。较新的 IE、Chrome、Firefox、iOS 和 Android 基本上都支持浏览器。

You can do CSS 3D transforms. Browser support is basically there in newer IE, Chrome, Firefox, iOS and Android.

作死小能手 2024-12-30 07:23:58

我实际上已经找到了答案......它是 CSS Shaders。

https://dvcs.w3.org/hg/FXTF /raw-file/tip/custom/index.html

尚未可用,但很快。

不使用 Canvas 的原因是为了简化创作。 (说来话长。)

I've actually figured out the answer... it's CSS Shaders.

https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html

Not yet available, but soon.

The reason not to use Canvas is for simplicity in authoring. (Long story.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文