Navigation Indicator

Developer
Size
3,472 Kb
Views
44,528

How do I make an navigation indicator?

A (somewhat) practical use of drawing shapes with box-shadow. This element could be used to easily indicate arrow-key navigation possibilities.. What is a navigation indicator? How do you make a navigation indicator? This script and codes were developed by Mike Fowler on 22 August 2022, Monday.

Navigation Indicator Previews

Navigation Indicator - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Navigation Indicator</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! */ .arrows { width: 0; height: 0; /* Order is Right, Down, Left, Up */ box-shadow: 12px 0 0 3px white, 0 0 0 3px white, -12px 0 0 3px white, 0 -12px 0 3px white, 12px 0 0 5px black, 0 0 0 5px black, -12px 0 0 5px black, 0 -12px 0 5px black;
}
.arrows.up { box-shadow: 12px 0 0 3px white, 0 0 0 3px white, -12px 0 0 3px white, 12px 0 0 5px black, 0 0 0 5px black, -12px 0 0 5px black, 0 -12px 0 5px black;
}
.arrows.right { box-shadow: 0 0 0 3px white, -12px 0 0 3px white, 0 -12px 0 3px white, 12px 0 0 5px black, 0 0 0 5px black, -12px 0 0 5px black, 0 -12px 0 5px black;
}
.arrows.down { box-shadow: 12px 0 0 3px white, -12px 0 0 3px white, 0 -12px 0 3px white, 12px 0 0 5px black, 0 0 0 5px black, -12px 0 0 5px black, 0 -12px 0 5px black;
}
.arrows.left { box-shadow: 12px 0 0 3px white, 0 0 0 3px white, 0 -12px 0 3px white, 12px 0 0 5px black, 0 0 0 5px black, -12px 0 0 5px black, 0 -12px 0 5px black;
}
/* PRESENTATION-ONLY, NOT NEEDED FOR IMPLEMENTATION */
.arrows { position: absolute; top: 50%; left: 50%; margin-top: -12px;
}
.arrows:after { content: 'UP'; position: relative; display: block; top: 30px; left: -50px; width: 100px; text-align: center; font-family: 'Helvetica Neue', 'Arial', sans-serif; font-style: normal; font-size: 12px; letter-spacing: 1px;
}
.arrows.left { margin-left: -150px;
}
.arrows.left:after { content: 'LEFT';
}
.arrows.up { margin-left: -50px;
}
.arrows.up:after { content: 'UP';
}
.arrows.right { margin-left: 50px;
}
.arrows.right:after { content: 'RIGHT';
}
.arrows.down { margin-left: 150px;
}
.arrows.down:after { content: 'DOWN';
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <i class="arrows left"></i>
<i class="arrows up"></i>
<i class="arrows right"></i>
<i class="arrows down"></i> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Navigation Indicator - Script Codes CSS Codes

.arrows { width: 0; height: 0; /* Order is Right, Down, Left, Up */ box-shadow: 12px 0 0 3px white, 0 0 0 3px white, -12px 0 0 3px white, 0 -12px 0 3px white, 12px 0 0 5px black, 0 0 0 5px black, -12px 0 0 5px black, 0 -12px 0 5px black;
}
.arrows.up { box-shadow: 12px 0 0 3px white, 0 0 0 3px white, -12px 0 0 3px white, 12px 0 0 5px black, 0 0 0 5px black, -12px 0 0 5px black, 0 -12px 0 5px black;
}
.arrows.right { box-shadow: 0 0 0 3px white, -12px 0 0 3px white, 0 -12px 0 3px white, 12px 0 0 5px black, 0 0 0 5px black, -12px 0 0 5px black, 0 -12px 0 5px black;
}
.arrows.down { box-shadow: 12px 0 0 3px white, -12px 0 0 3px white, 0 -12px 0 3px white, 12px 0 0 5px black, 0 0 0 5px black, -12px 0 0 5px black, 0 -12px 0 5px black;
}
.arrows.left { box-shadow: 12px 0 0 3px white, 0 0 0 3px white, 0 -12px 0 3px white, 12px 0 0 5px black, 0 0 0 5px black, -12px 0 0 5px black, 0 -12px 0 5px black;
}
/* PRESENTATION-ONLY, NOT NEEDED FOR IMPLEMENTATION */
.arrows { position: absolute; top: 50%; left: 50%; margin-top: -12px;
}
.arrows:after { content: 'UP'; position: relative; display: block; top: 30px; left: -50px; width: 100px; text-align: center; font-family: 'Helvetica Neue', 'Arial', sans-serif; font-style: normal; font-size: 12px; letter-spacing: 1px;
}
.arrows.left { margin-left: -150px;
}
.arrows.left:after { content: 'LEFT';
}
.arrows.up { margin-left: -50px;
}
.arrows.up:after { content: 'UP';
}
.arrows.right { margin-left: 50px;
}
.arrows.right:after { content: 'RIGHT';
}
.arrows.down { margin-left: 150px;
}
.arrows.down:after { content: 'DOWN';
}

Navigation Indicator - Script Codes JS Codes

(function() {
}).call(this);
Navigation Indicator - Script Codes
Navigation Indicator - Script Codes
Home Page Home
Developer Mike Fowler
Username mikefowler
Uploaded August 22, 2022
Rating 3
Size 3,472 Kb
Views 44,528
Do you need developer help for Navigation Indicator?

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!

Mike Fowler (mikefowler) Script Codes
Create amazing sales emails 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!