Responsive grid of hexagons

后端 未结 9 562
礼貌的吻别
礼貌的吻别 2020-11-22 09:30

I loaded in multiple images on my website from the internet. Is it possible to give all those images an hexagon shape in a responsive grid?

         


        
9条回答
  •  既然无缘
    2020-11-22 09:51

    You can create an image with transparent hexagon shape and superimpose it over injected image.

    HTML:

    CSS:

    .hexagon {
        position: relative;
    }
    
    .hexagon > img {
        position: absolute;
    }
    

    Demo: http://jsfiddle.net/dr6Hp/3/

提交回复
热议问题