CSS triangles with border
How do I make an css triangles with border?
A SASS mixin to generate CSS traingles with borders. Specify direction, border width, background color, border colour, triangle size.. What is a css triangles with border? How do you make a css triangles with border? This script and codes were developed by Daniel Grant on 28 December 2022, Wednesday.
CSS triangles with border - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS triangles with border</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ div { display: inline-block; margin-right: 20px;
}
.arrow-up { width: 200px; height: 100px; overflow: hidden;
}
.arrow-up:before, .arrow-up:after { content: ''; border-style: solid; position: absolute;
}
.arrow-up:before { border-width: 100px; border-color: transparent transparent #000 transparent; top: -100px;
}
.arrow-up:after { border-width: 99px; left: 2px; border-color: transparent transparent #fff transparent; top: -98px; left: 1px;
}
.arrow-down { width: 200px; height: 100px; overflow: hidden;
}
.arrow-down:before, .arrow-down:after { content: ''; border-style: solid; position: absolute;
}
.arrow-down:before { border-width: 100px; border-color: #000 transparent transparent transparent;
}
.arrow-down:after { border-width: 95px; left: 10px; border-color: pink transparent transparent transparent; left: 5px;
}
.arrow-right { width: 75px; height: 150px; overflow: hidden;
}
.arrow-right:before, .arrow-right:after { content: ''; border-style: solid; position: absolute;
}
.arrow-right:before { border-width: 75px; border-color: transparent transparent transparent #000;
}
.arrow-right:after { border-width: 73px; left: 4px; border-color: transparent transparent transparent green; top: 2px; left: 0;
}
.arrow-left { width: 75px; height: 150px; overflow: hidden;
}
.arrow-left:before, .arrow-left:after { content: ''; border-style: solid; position: absolute;
}
.arrow-left:before { border-width: 75px; border-color: transparent pink transparent transparent; left: -75px;
}
.arrow-left:after { border-width: 70px; left: 10px; border-color: transparent blue transparent transparent; top: 5px; left: -65px;
}
body { padding: 15px;
}
* { position: relative;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="arrow-up"></div>
<div class="arrow-down"></div>
<div class="arrow-left"></div>
<div class="arrow-right"></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
CSS triangles with border - Script Codes CSS Codes
div { display: inline-block; margin-right: 20px;
}
.arrow-up { width: 200px; height: 100px; overflow: hidden;
}
.arrow-up:before, .arrow-up:after { content: ''; border-style: solid; position: absolute;
}
.arrow-up:before { border-width: 100px; border-color: transparent transparent #000 transparent; top: -100px;
}
.arrow-up:after { border-width: 99px; left: 2px; border-color: transparent transparent #fff transparent; top: -98px; left: 1px;
}
.arrow-down { width: 200px; height: 100px; overflow: hidden;
}
.arrow-down:before, .arrow-down:after { content: ''; border-style: solid; position: absolute;
}
.arrow-down:before { border-width: 100px; border-color: #000 transparent transparent transparent;
}
.arrow-down:after { border-width: 95px; left: 10px; border-color: pink transparent transparent transparent; left: 5px;
}
.arrow-right { width: 75px; height: 150px; overflow: hidden;
}
.arrow-right:before, .arrow-right:after { content: ''; border-style: solid; position: absolute;
}
.arrow-right:before { border-width: 75px; border-color: transparent transparent transparent #000;
}
.arrow-right:after { border-width: 73px; left: 4px; border-color: transparent transparent transparent green; top: 2px; left: 0;
}
.arrow-left { width: 75px; height: 150px; overflow: hidden;
}
.arrow-left:before, .arrow-left:after { content: ''; border-style: solid; position: absolute;
}
.arrow-left:before { border-width: 75px; border-color: transparent pink transparent transparent; left: -75px;
}
.arrow-left:after { border-width: 70px; left: 10px; border-color: transparent blue transparent transparent; top: 5px; left: -65px;
}
body { padding: 15px;
}
* { position: relative;
}
Developer | Daniel Grant |
Username | djgrant |
Uploaded | December 28, 2022 |
Rating | 3 |
Size | 3,146 Kb |
Views | 8,096 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Touch rem | 2,979 Kb |
A Pen by Daniel Grant | 2,464 Kb |
Transitioning application screens with semantically named classes | 3,697 Kb |
Zero element inline validation bubble | 4,117 Kb |
CSS triangles with border | 3,146 Kb |
Loading bar for ajax pages | 2,464 Kb |
Gradient Border | 2,600 Kb |
Number input with controls | 2,867 Kb |
Grid crosshairs | 2,193 Kb |
Responsive Modal | 4,178 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Perforated foil | 0x04 | 2,617 Kb |
Voting App - register | MatheusLima92 | 1,948 Kb |
Minimal Menu | Achudars | 3,430 Kb |
Improved Page Flipping Effect | Usaphp | 5,201 Kb |
Horizontal Navigation with Floats | Gymratpacks | 5,403 Kb |
Tab panels | Accessibility | 0 Kb |
Scroll using CSS | Casperovic | 2,159 Kb |
Fun form with currentColor | Bnthor | 2,713 Kb |
Save for later... | Victorfreire | 1,359 Kb |
A bit of elegance | Hackthevoid | 9,095 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!