html5 - Creating a transparent arrow above image in CSS3 -
i'm trying create effect have transparent arrow above image in css3. see following image.

any ideas how effect? using less if comes help.
to draw transparent / inverted triangle in css3
you use css3 triangle technic, , make inverted shape combining :before , :after pseudo objects, each draw 1 part of triangle.
you this:
.image { position:relative; height:200px; width:340px; background:orange; } .image:before, .image:after { content:''; position:absolute; width:0; border-left:20px solid white; left:0; } .image:before { top:0; height:20px; border-bottom:16px solid transparent; } .image:after { top:36px; bottom:0; border-top:16px solid transparent; } here illustrative jsfiddle
i used plane orange background example ... can change image, , wanted =)
edit: , more final result this
Comments
Post a Comment