是否可以在不使用画布的情况下对图像进行像素化? [英] Is it possible to pixelate an image without canvas?

查看:68
本文介绍了是否可以在不使用画布的情况下对图像进行像素化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给出一个< img> 元素,是否可以仅使用CSS和/或不使用画布来像素化图像?我见过类似 crisp edges 功能(但这仅适用于缩放后的图像)之类的东西画布选项,但我希望有更好的方法.

Given an <img> element, is it possible to pixelate the image using only CSS and/or not use canvas? I've seen things like the crisp edges feature (but that's just for images that are scaled) and a lot of canvas options, but I'm hoping for a better way.

推荐答案

您可以通过使用 image-rendering:pixelated; CSS规则并放大图像来实现像素化效果-请参阅本文.

You can achieve a pixelated affect by using the image-rendering: pixelated; CSS rule and scaling up an image - see this article.

这篇关于是否可以在不使用画布的情况下对图像进行像素化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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