css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <script type="application/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script type="application/javascript" src="SOURCE_URL/reading-indicator.min.js"></script>

<header id="header">
  <h2>Lorem Ipsum</h2>
  <h4>"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."</h4>
<div id="content">
	<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque diam dui, vehicula ut blandit non, varius et ex. Suspendisse sodales dolor leo, quis vehicula dui euismod ac. Nulla mi orci, sagittis semper ligula quis, gravida porttitor arcu. Duis arcu dui, tincidunt ac dui id, placerat euismod metus. Etiam eleifend gravida justo, et rutrum velit vehicula sed. Pellentesque eget facilisis lorem. Pellentesque quis tristique nisl, sed condimentum dui. Mauris placerat nisi mi, a tempor nibh rhoncus sit amet. Etiam vulputate tellus porta eros varius tempor. Suspendisse turpis nisl, condimentum vel mattis eu, mollis in tortor. Praesent pellentesque enim a lacus lacinia condimentum. Ut orci lectus, imperdiet id pharetra id, fringilla ut nulla. Duis elementum sapien quis ipsum fringilla, at mattis nibh consectetur. Phasellus non est lacus.</p>
	<p>Duis sagittis turpis eget sagittis vehicula. Fusce imperdiet lobortis nisi at dictum. Pellentesque vel faucibus mi. Integer finibus posuere quam sit amet porta. Duis maximus metus id ornare bibendum. Praesent varius leo eget varius laoreet. Etiam venenatis nisl nunc. Suspendisse elementum nunc vitae urna faucibus auctor. Quisque tincidunt pellentesque erat ac faucibus. Curabitur vel sollicitudin ligula. Nulla pharetra blandit molestie. In at quam libero. In at lectus varius, imperdiet dui hendrerit, eleifend lectus. Mauris ac justo sed tortor feugiat euismod. Vestibulum id molestie dolor.</p>
	<p>Sed ullamcorper, lacus non molestie blandit, justo lectus vestibulum metus, sit amet rhoncus orci quam at sem. Sed sit amet sodales arcu, ut congue nulla. Pellentesque mattis ac arcu ut venenatis. Nam euismod massa eu odio elementum vestibulum. Nam feugiat magna quis mollis porttitor. Praesent ut sem a arcu volutpat lacinia in et est. Vivamus mattis elit felis, tempus ornare sapien vulputate nec. Nullam ut ligula et purus aliquam sodales in in mi. Etiam id luctus felis. Donec eget tempor sem. Etiam vel elit libero.</p>
	<p>Donec pretium erat magna, lobortis dapibus justo molestie sed. Proin eu ipsum varius, varius nibh eu, molestie justo. Aliquam rhoncus facilisis magna sed iaculis. Proin vel facilisis eros, et bibendum tortor. Sed tincidunt nisl quis sapien suscipit, nec tristique neque porta. Fusce non lectus tincidunt nibh fermentum bibendum. Mauris feugiat semper felis eget euismod. Pellentesque tempus ultrices nisi, a volutpat metus iaculis id. Praesent augue quam, maximus eget pretium sed, eleifend at nulla. Sed lobortis nulla nisl, consequat gravida elit tempus eu. Quisque non urna vel mauris cursus pellentesque. Pellentesque at vulputate dolor.</p>
	<p>Suspendisse ac pharetra libero. Etiam orci nisl, scelerisque id est quis, scelerisque luctus sapien. Quisque elementum nunc in efficitur blandit. Quisque nibh velit, tempus a dui eget, tristique sagittis sapien. Morbi finibus velit at pulvinar viverra. Praesent mollis luctus lectus, ut eleifend magna imperdiet lobortis. Etiam elementum ex magna, sit amet tincidunt felis hendrerit sed. Mauris ac tempus libero. Duis porttitor egestas porttitor. Etiam a orci in metus auctor egestas sit amet quis quam. Nulla ac arcu in orci tempus ultrices. Mauris nec ultricies elit.</p>
<footer id="footer">
	<p>Creation : <a href="http://www.testeur.ml" target="_blank">Mathieu Chartier</a></p>
	<p>&copy; <a href="https://www.internet-formation.fr" target="_blank">Internet-Formation</a></p>
              /* Style : general */
* {margin:0; padding:0}
body{font-family:arial, helvetica;}
h2 {font-size:2em; margin:1.2em 0 .8em; text-align:center}
h4 {font-size:1.2em; text-align:center}
hr {margin:3em 0}
#content {padding:2em 2em 0}
#footer {background:#222; margin-top:3em; padding:2em; color:#eee; text-align:center; line-height:2em}
#footer a {color:#999; text-decoration:none}

/* Pour placer les valeurs */
.value-top {bottom:0;}
.value-bottom {top:0;}

/* Barre de défilement horizontale => TOP */
.reading-top {height:10px; width:100%; display:block; background:#222; position:absolute; top:0; z-index:9999;}
.reading-top.stickyProgressBar {position:fixed;}
.reading-top .reading-progress {position:relative; background:#007db7; width:0%; height:100%;}
.reading-top .reading-percentage {position:absolute; right:0; font-size:1.1em; text-align:center; color:#fff; background:#007db7; padding:.3em; white-space:nowrap; display:inline-block;}
              // Custom display
jQuery(document).ready(function($) {
  var options = {
		context: 'middle',
		distance: 0,
		targetProgressBar: '#content',
		fixedBarSize: true,
		stickyProgressBar: true,
		progressPositions: {
		progressBarValue: true,
    scrollStopDelay: 0,
    cbkPercentDisplay: function(values, classes) {
			// Récupération des valeurs utiles (objet JSON)
			var displayPercent = values.percent; // Pourcentage de 0% à 100%
      var invertedPercent = values.invertedPercent; // Pourcentage inversé (de 100% à 0%)
			var realPercent = values.realPercent; // Pourcentage réel

			// Récupération des classes
			var percentSignClass = classes.percentSignClass;

			// Affichage du pourcentage
      if(displayPercent <= 50) {
			  return '<strong>Reading</strong>: '+displayPercent+'<span class="'+percentSignClass+'">%</span>';
      } else {
        return invertedPercent+'<span class="'+percentSignClass+'">%</span> left to read';  

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................