要使用HTML5将图片设置为灰度图,可以使用CSS的filter属性。具体代码如下:,,``html,,,,, img {, filter: grayscale(100%);, },,,,,,,,,`` 介绍 HTML5本身并不直接支持将图片转换为灰度图……