Gray out image with CSS?

后端 未结 9 2171
轮回少年
轮回少年 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:27

    If you don't mind using a bit of JavaScript, jQuery's fadeTo() works nicely in every browser I've tried.

    jQuery(selector).fadeTo(speed, opacity);
    

提交回复
热议问题