SuprLiTE CSS Arrows

Developer
Size
3,691 Kb
Views
24,288

How do I make an suprlite css arrows?

Some lite and re-usable a tags. Built using a box-shadow with a cute hover transition on top. It's extremely easy to customize these and put them wherever you need some arrows. Check 'em out!. What is a suprlite css arrows? How do you make a suprlite css arrows? This script and codes were developed by Billy Crist on 04 October 2022, Tuesday.

SuprLiTE CSS Arrows Previews

SuprLiTE CSS Arrows - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>SuprLiTE CSS Arrows</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.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! */ .arrow { position: absolute; padding: 3rem; /* Arrow size */ box-shadow: 1px -1px 0 1px plum inset; -webkit-box-shadow: 2px -2px plum inset; border: solid transparent; border-width: 0 0 2rem 2rem; transition: 0.2s;
}
.arrow:hover { box-shadow: 2px -2px 0 2px orchid inset; -webkit-box-shadow: 4px -4px orchid inset;
}
.arrow-up { transform:rotate(135deg) }
.arrow-right { transform:rotate(225deg) }
.arrow-down { transform:rotate(-45deg) }
.arrow-left { transform:rotate(45deg) }
/* Codepen layout: */
html { height:100% }
body { background-color:lavender }
.arrow { top:50%;margin:-67px 0 0 -67px;left:35% }
a:nth-child(2) { left:65% }
/* Video link: */
.video { font-family:sans-serif;font-size:20px;color:plum;top:2rem;left:2rem;position:absolute }
.video:hover { color:orchid } </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <a class="arrow arrow-left" title="Previous" href="javascript:;"></a>
<a class="arrow arrow-right" title="Next" href="javascript:;"></a>
<!-- Youtube video tutorial! -->
<!-- My first ever screen-recording/tutorial haha : ) Give it a view please! -->
<a class="video" href="https://bit.ly/YzWdcy" target="_blank">Video Tutorial</a> <script src="js/index.js"></script>
</body>
</html>

SuprLiTE CSS Arrows - Script Codes CSS Codes

.arrow { position: absolute; padding: 3rem; /* Arrow size */ box-shadow: 1px -1px 0 1px plum inset; -webkit-box-shadow: 2px -2px plum inset; border: solid transparent; border-width: 0 0 2rem 2rem; transition: 0.2s;
}
.arrow:hover { box-shadow: 2px -2px 0 2px orchid inset; -webkit-box-shadow: 4px -4px orchid inset;
}
.arrow-up { transform:rotate(135deg) }
.arrow-right { transform:rotate(225deg) }
.arrow-down { transform:rotate(-45deg) }
.arrow-left { transform:rotate(45deg) }
/* Codepen layout: */
html { height:100% }
body { background-color:lavender }
.arrow { top:50%;margin:-67px 0 0 -67px;left:35% }
a:nth-child(2) { left:65% }
/* Video link: */
.video { font-family:sans-serif;font-size:20px;color:plum;top:2rem;left:2rem;position:absolute }
.video:hover { color:orchid }

SuprLiTE CSS Arrows - Script Codes JS Codes

// *****************************
// UPDATE 03/24 5:32pm PST
// I came up with the break-through idea I had been hoping to come up with since the beginning: being able to remove the :before element but keep the better clickable area. The solution: An effing transparent border!!! So I've removed the entire :before element and it's 6 lines of code, and added a transparent border with 2 lines to the .arrow
// Yippee!!
// CSS before the update:
//
// .arrow {
// box-shadow: -1px 1px 0 1px plum;
// transition: .24s;
// transform: rotate(45deg);
// position: absolute;
// padding: 50px;
//}
//.arrow:before {
// position: absolute;
// padding: 80%;
// content: '';
// right: -15%;
// top: -15%;
//}
// *****************************
// Simple arrows.
// Let me know if you have ideas to make them better!!! : )
// NOTES:
// The border is there only to increase the clickable area. You can remove it and it will work perfectly fine, you'll just only be able to click "inside" the arrow, and not "around" it. If you add a background color you can see it and play with it's size if you want.
// The -webkit-box-shadow is there because without it it displays slightly different in webkit and you can see some of the shadow on the opposite side of the arrow.
// There might be an easier/lite-er way using a simple icon font or something like that, but that's no fun.
// Here's some CSS arrows you can use anywhere, play with, and change the size, color, hover state, and transition in half a second without having to touch anything else.
// Just make another class with a different degree of rotation to have other arrows pointing any direction.
// I experimented using before and after pseudo elements, just borders, and just box-shadows, but this box-shadow + border variation ended up being the one with the least code, yet also the most versatile since you can add multiple shadows and blurs if you want to get more creative.
// These experimentations were inspired by the arrow pens of Olivier Gorzalka - https://codepen.io/clearideaz/pen/tGbIi and Steffen Gramberg - https://codepen.io/minustalent/pen/Frhaw
// @vsync (codepen.io/yairEO) pressured me to make them better : )
SuprLiTE CSS Arrows - Script Codes
SuprLiTE CSS Arrows - Script Codes
Home Page Home
Developer Billy Crist
Username billyysea
Uploaded October 04, 2022
Rating 4.5
Size 3,691 Kb
Views 24,288
Do you need developer help for SuprLiTE CSS Arrows?

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!

Billy Crist (billyysea) Script Codes
Create amazing blog posts with AI!

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!