CSS or JavaScript to highlight certain area of image opacity

前端 未结 5 1814
攒了一身酷
攒了一身酷 2021-01-14 14:46

I\'m looking to do something like this but with CSS or JavaScript.

I need to highlight a certain part of an image but everything I find is how to do it in Photoshop.

5条回答
  •  抹茶落季
    2021-01-14 15:07

    You can probably fake it, here is a sample: http://jsfiddle.net/erick/JMBFS/3/

    I covered the image with an opaque element. The color of the element is the same as the background of the image. Used z-index to put it on top.

提交回复
热议问题