0

I hate drawing boring straight lines. How would I draw a line that starts wide and ends narrow using html/css similar to the one shown in this image.

enter image description here

Harry
  • 87,580
  • 25
  • 202
  • 214
Michael L
  • 13
  • 1
  • 1
  • In my opinion, that looks more like a compressed right-angle triangle (albeit tilted a bit). So you should be able to achieve that by creating a triangle (there are umpteen examples of that) and then rotating/skewing a bit. – Harry Feb 19 '16 at 15:10
  • 1
    You're right. Thanks. – Michael L Feb 19 '16 at 15:21

1 Answers1

2

Here's an example of what Harry mentioned

.triangle{
  border-top:10px solid transparent;
  border-bottom:10px solid transparent;
  border-right:300px solid red;
}
<div class="triangle"></div>
Joey M-H
  • 763
  • 1
  • 6
  • 15