Gray out image with CSS?

后端 未结 9 2172
轮回少年
轮回少年 2020-12-02 03:55

What\'s the best way (if any) to make an image appear \"grayed out\" with CSS (i.e., without loading a separate, grayed out version of the image)?

My context is that

9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 04:42

    Here's an example that let's you set the color of the background. If you don't want to use float, then you might need to set the width and height manually. But even that really depends on the surrounding CSS/HTML.

    
    
    

提交回复
热议问题