Reading Position Indicator (Illustration)
How do I make an reading position indicator (illustration)?
A demo for my upcoming article.... What is a reading position indicator (illustration)? How do you make a reading position indicator (illustration)? This script and codes were developed by Pankaj Parashar on 12 August 2022, Friday.
Reading Position Indicator (Illustration) - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Reading Position Indicator (Illustration)</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <p>* Refresh the page multiple times to bring the animation in sync!</p>
<div class="container"> <div class="document"> <div class="visible-area" data-value="0"> <div class="short"></div> <div class="long"></div> <div class="medium"></div> <br> <div class="short"></div> <div class="long"></div> <div class="medium"></div> <br> <div class="short"></div> <div class="long"></div> </div> <div class="hidden-area"> <div class="short"></div> <div class="long"></div> <div class="medium"></div> <br> <div class="short"></div> <div class="long"></div> <div class="medium"></div> <br> <div class="short"></div> <div class="long"></div> </div> </div> <div class="window"> <div class="progress-bar"></div> </div> <div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Reading Position Indicator (Illustration) - Script Codes CSS Codes
@import url(http://fonts.googleapis.com/css?family=Alegreya+Sans:700italic,400italic);
*,
*::before,
*::after { box-sizing: border-box;
}
body { font-family: NexusSansTF-Regular, Lucida Grande, sans-serif; line-height: 1.5;
}
header { background-color: #1F282D; padding: 1.5em; position: fixed; width: 100%; height: auto; top: 0; left: 0; z-index: 1;
}
h1 { font-family: 'Alegreya Sans', sans-serif; font-style: italic; display: block; margin: .5em auto 0em; color: #fff; line-height: 1; text-align: center;
}
h1 > span { border-bottom: 1px solid;
}
h2 { font-family: 'Alegreya Sans', sans-serif; font-style: italic; font-weight: 400; font-size: 1.25em; color: #9ab; padding-bottom: .5em; text-align: center;
}
.container { margin-top: 27.5em; position: relative; height: 100%;
}
.window { width: 250px; height: 250px; border: 10px solid #3FA9F5; position: absolute; top: 0; right:0; left:0; bottom:0; margin: auto;
}
.document { position: absolute; top: 250px; right:0; left:0; bottom:0; margin: auto; width: 230px; height: 500px; border: 1px solid #ddd; padding: 10px; padding-top: 22px; -webkit-animation-name: move-top; animation-name: move-top; -webkit-animation-duration: 5s; animation-duration: 5s; -webkit-animation-iteration-count: 1; animation-iteration-count: 1; -webkit-animation-direction: alternate; animation-direction: alternate; -webkit-animation-timing-function: linear; animation-timing-function: linear; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; -webkit-animation-delay: 5s; animation-delay: 5s;
}
@-webkit-keyframes move-top { 100% { top: -250px; }
}
@keyframes move-top { 100% { top: -250px; }
}
@-webkit-keyframes expand-height { 100% { height: 250px; }
}
@keyframes expand-height { 100% { height: 250px; }
}
@-webkit-keyframes progress-bar { 100% { width: 100%; }
}
@keyframes progress-bar { 100% { width: 100%; }
}
@-webkit-keyframes fade-in { 0%, 100% { opacity: 1; }
}
@keyframes fade-in { 0%, 100% { opacity: 1; }
}
.short { background-color: #ddd; width: 25%; height: 15px; margin-bottom: 5px;
}
.medium { background-color: #ddd; width: 50%; height: 15px; margin-bottom: 5px;
}
.long { background-color: #ddd; width: 75%; height: 15px; margin-bottom: 5px;
}
.visible-area { position: relative;
}
.hidden-area { position: absolute; background-color: #ffc; width: 100%; height: 250px; bottom: 0; left: 0; padding: 10px; padding-top: 30px;
}
.progress-bar { width: 0%; height: 5px; background-color: #F15D5A; position: absolute; left: 0; top: 0;
}
.visible-area::before { content: ''; position: absolute; border-right: 1px solid orange; border-bottom: 1px solid orange; border-top: 1px solid orange; top: -20px; bottom: 0; right: -50px; height: 0; width: 10px; -webkit-animation-name: expand-height; animation-name: expand-height; -webkit-animation-duration: 5s; animation-duration: 5s; -webkit-animation-iteration-count: 1; animation-iteration-count: 1; -webkit-animation-direction: alternate; animation-direction: alternate; -webkit-animation-timing-function: linear; animation-timing-function: linear; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; -webkit-animation-delay: 5s; animation-delay: 5s;
}
.visible-area::after { content: 'value: ' attr(data-value); line-height: 2; color: orange; vertical-align: baseline; position: absolute; text-align: right; border-bottom: 1px solid orange; top: -20px; padding-left: 10px; right: -150px; width: 100px;
}
.hidden-area::before { content: ''; position: absolute; border-left: 1px solid green; border-top: 1px solid green; border-bottom: 1px solid green; left: -50px; top: 0; height: 100%; width: 10px;
}
.hidden-area::after { content: 'max: 250'; line-height: 2; color: green; vertical-align: baseline; position: absolute; border-bottom: 1px solid green; top: 0; left: -150px; width: 100px;
}
Reading Position Indicator (Illustration) - Script Codes JS Codes
$(document).on('ready', function(){ var visibleArea = $('.visible-area'), i = 0; $('.progress-bar').delay(5000).animate({"width": "100%"}, 5000); $('.document').delay(5000).animate({"top": "-250px"}, 5000); setTimeout( function(){ var myTimer = setInterval(function(){ visibleArea.attr('data-value', i+1); i++; if(i == 250){ clearInterval(myTimer); } }, 18); }, 5000);
});
Developer | Pankaj Parashar |
Username | pankajparashar |
Uploaded | August 12, 2022 |
Rating | 3 |
Size | 3,010 Kb |
Views | 36,432 |
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 |
3D Pie Chart using amCharts.js | 1,958 Kb |
A Pen by Pankaj Parashar | 9,016 Kb |
Minimal business card | 2,447 Kb |
The Chili Recipe | 23,620 Kb |
Pure CSS Tags | 2,089 Kb |
Todo App using React.js | 2,487 Kb |
Animated Color Schemes | 3,286 Kb |
Webkit Scrollbars | 4,059 Kb |
HTML5 Meter Element | 2,732 Kb |
Fantasy Form | 7,314 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 |
HTM5 picture dropzone | Jaysalvat | 2,576 Kb |
A Pen by Andrea Verlicchi | Verlok | 2,018 Kb |
LDE old privacy page | Jasonangle | 2,339 Kb |
TinFoil Boats | Chandralil | 4,577 Kb |
A bit of elegance | Hackthevoid | 9,095 Kb |
We Simplify animation | Meodai | 48,169 Kb |
Google Maps API Ground Overlay | Boycetrus | 2,961 Kb |
SlideDown FixedMenu | Mp_graphic | 5,602 Kb |
Pure CSS Read More Arrow | Zephyr | 1,747 Kb |
AngularJS Datalist Directive | M-e-conroy | 2,366 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!