Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you make this dogeared shape with css only

dogearCan anyone show me (and explain) how to create this image with CSS only and with 1 shape (50x50px)a square with a transparent "dogear" on the bottom right?

I've been playing with triangles and circles with borders, but this has extra sides which I can't figure out on my own how to build. Thanks.

like image 714
Ben Racicot Avatar asked Sep 11 '25 19:09

Ben Racicot


1 Answers

How about using gradients?

div{
  width: 50px;
  height: 50px;    
  background:
   linear-gradient(135deg, #333 0%, #333 90%, transparent 90%, transparent 100%);
}

http://jsfiddle.net/dCc7G/

like image 53
nice ass Avatar answered Sep 13 '25 11:09

nice ass