Last active
March 30, 2018 14:42
-
-
Save amelieykw/bc9b215bec63f5caef11607be3f86cad to your computer and use it in GitHub Desktop.
[draw arrow of different angles in HTML with CSS] #HTML #CSS #arrow #drawArrow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.arrow { | |
height: 50px; | |
position: relative; | |
width: 30px; | |
background: black; | |
margin: 100px; | |
display: inline-block; | |
} | |
.arrow:before { | |
content: " "; | |
width: 20px; | |
background: black; | |
height: 45px; | |
position: absolute; | |
top: -15px; | |
transform: rotate(50deg); | |
left: -5px; | |
} | |
.arrow:after { | |
content: " "; | |
width: 20px; | |
background: black; | |
height: 45px; | |
position: absolute; | |
top: -15px; | |
transform: rotate(-50deg); | |
right: -5px; | |
} | |
.left { | |
transform: rotate(-90deg); | |
} | |
.right { | |
transform: rotate(90deg); | |
} | |
.half-left { | |
transform: rotate(-45deg); | |
} | |
.half-right { | |
transform: rotate(45deg); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="arrow"> </div> | |
<div class="arrow left"> </div> | |
<div class="arrow right"> </div> | |
<div class="arrow half-left"> </div> | |
<div class="arrow half-right"> </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment