Advertisement
rAthus

CSS triangle with background image

Mar 14th, 2019
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.35 KB | None | 0 0
  1. .triangle {
  2.     width: 200px;
  3.     height: 300px;
  4.     background: url(https://goo.gl/DBwTik);
  5.     background-size: cover;
  6.     background-position: center center;
  7.     clip-path: polygon(0 0, 100% 0, 50% 100%);
  8. }
  9.  
  10. /*
  11. source: https://tutorialzine.com/2017/03/css-triangles-without-hacks
  12. other idea to explore: https://codepen.io/ividic/pen/NxBbNR
  13. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement