Created
May 5, 2017 13:47
-
-
Save lanmaster53/aa9909f2cc92606d9b148eb8e7da9c1d to your computer and use it in GitHub Desktop.
This file contains 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Arrow</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
.arrow-1 { | |
content: ""; | |
width: 20px; | |
height: 20px; | |
border-top: 10px solid red; | |
border-right: 10px solid red; | |
border-bottom: 10px solid #000; | |
border-left: 10px solid red; | |
} | |
.arrow-2 { | |
content: ""; | |
width: 10px; | |
height: 10px; | |
border-top: 10px solid red; | |
border-right: 10px solid red; | |
border-bottom: 10px solid #000; | |
border-left: 10px solid red; | |
} | |
.arrow-3 { | |
content: ""; | |
width: 0; | |
height: 0; | |
border-top: 10px solid red; | |
border-right: 10px solid red; | |
border-bottom: 10px solid #000; | |
border-left: 10px solid red; | |
} | |
.arrow-4 { | |
content: ""; | |
width: 0; | |
height: 0; | |
border-top: 10px solid transparent; | |
border-right: 10px solid transparent; | |
border-bottom: 10px solid #000; | |
border-left: 10px solid transparent; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="arrow-1"></div>border 10px, width 20px, colored<br><br> | |
<div class="arrow-2"></div>border 10px, width 10px, colored<br><br> | |
<div class="arrow-3"></div>border 10px, width 0px, colored<br><br> | |
<div class="arrow-4"></div>border 10px, width 0px, transparent<br><br> | |
The way that borders cut from corner to corner allows us to create triangles in pure CSS! | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment