博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
灰度图片 css_使用CSS滤镜将图像显示为灰度
阅读量:2513 次
发布时间:2019-05-11

本文共 978 字,大约阅读时间需要 3 分钟。

灰度图片 css

aren't yet widely supported but they are indeed impressive and a modern need for web imagery.  CSS filters allow you to modify the display of images in a variety of ways, one of those ways being displaying images as grayscale.

尚未得到广泛支持,但它们确实令人印象深刻,并且是对Web图像的现代需求。 CSS过滤器允许您以多种方式修改图像的显示,其中一种方式是将图像显示为灰度。

Doing so requires the most minimal of CSS:

这样做需要最少CSS:

img.bw {	filter: grayscale(1);}

You can even animate an image to or from grayscale:

您甚至可以为图像设置灰度或从灰度设置动画:

img.bw {	filter: grayscale(0);}img.bw.grey {	filter: grayscale(1);	transition-property: filter;	transition-duration: 1s;	}

allow much more than just grayscale adjustments, so if you haven't taken the time, please play around with my .  Remember that if the user chooses to download the image, it is downloaded in its original colored displays, but for online display purposes, CSS filters do the trick!

不仅仅可以进行灰度调整,因此,如果您还没有花时间,请试用我的 。 请记住,如果用户选择下载图像,则会以其原始的彩色显示器下载该图像,但是出于在线显示目的,CSS过滤器可以解决问题!

翻译自:

灰度图片 css

转载地址:http://mppwd.baihongyu.com/

你可能感兴趣的文章
vim 程序编辑器
查看>>
LIS(单调队列优化 C++ 版)(施工ing)
查看>>
刚接触Vuex
查看>>
四种加载React数据的技术对比(Meteor 转)
查看>>
Airthmetic_Approching
查看>>
操作文本文件
查看>>
公司项目的几个问题
查看>>
解决win7下打开Excel2007,报“向程序发送命令时出现问题”的错误
查看>>
Velocity快速入门教程
查看>>
关于集合常见的问题
查看>>
车牌正则表达式
查看>>
Win form碎知识点
查看>>
避免使用不必要的浮动
查看>>
第一节:ASP.NET开发环境配置
查看>>
sqlserver database常用命令
查看>>
rsync远程同步的基本配置与使用
查看>>
第二天作业
查看>>
访问属性和访问实例变量的区别
查看>>
Spring MVC 异常处理 - SimpleMappingExceptionResolver
查看>>
props 父组件给子组件传递参数
查看>>