Adding Instagram filters on images in my website

前端 未结 4 1270
無奈伤痛
無奈伤痛 2021-01-24 09:16

I am using CSSGram on my website to make images have Instagram-like filters. This is the method below to add a filter to a image:

 
4条回答
  •  隐瞒了意图╮
    2021-01-24 09:51

    The styles are based on a img sitting inside figure element. You could automatically wrap all of the images in a figure element like so

    $(function() {
        $("img").wrap("
    "); });

    However, you might want to be more specific with that selector as it could break other images like logos, social icons etc

    Working example here:

    https://jsfiddle.net/cs9asjhs/

提交回复
热议问题