Silhouette a PNG image using CSS

前端 未结 4 1479
北恋
北恋 2020-12-06 19:46

Anyone know of a way that I can get CSS to make a PNG image with transparency look completely blacked out like a silhouette?

In other words- Going from something li

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-06 20:31

    I don't see how it could be done with pure css. Javascript might be able to acheive it but you may consider using server side programming instead. With php you could make a duplicate of your original png on the server and replace the non-transparent pixels with a single color. It would be similar to a watermarking function.

提交回复
热议问题