Lexicon / Scroll behaviour · 10 of 11

23 / Scroll behaviour

Scrollspy

Whatever has reached the top of the screen is the thing the index marks as where you are.

Eighty days, leg by leg

In the winter of 1872 readers of Le Temps followed Phileas Fogg around the world in instalments, and the last appeared on his deadline. Read the journey: the timetable beside it marks the leg you are on, and ticks off the ones behind you.

Days 1–7 of 80

I From London to Suez

Engraving by de Neuville or Benett: The wager at the Reform Club
The wager at the Reform Club

“The world is big enough.” “It was once,” said Phileas Fogg, in a low tone.

Chapter III

Days 8–20 of 80

II From Suez to Bombay

Engraving by de Neuville or Benett: Passepartout in the pagoda on Malabar Hill
Passepartout in the pagoda on Malabar Hill

…he happened to espy the splendid pagoda on Malabar Hill, and was seized with an irresistible desire to see its interior.

Chapter X

Days 21–23 of 80

III From Bombay to Calcutta

Engraving by de Neuville or Benett: Across India on the elephant Kiouni
Across India on the elephant Kiouni

“What a price, good heavens!” cried Passepartout, “for an elephant.”

Chapter XI

Days 24–36 of 80

IV From Calcutta to Hong Kong

Engraving by de Neuville or Benett: Fix and Passepartout in a Hong Kong tavern
Fix and Passepartout in a Hong Kong tavern

It was in one of these dens that Fix and Passepartout, in search of a friendly glass, found themselves.

Chapter XIX

Days 37–42 of 80

V From Hong Kong to Yokohama (Japan)

Engraving by de Neuville or Benett: The Tankadere in the typhoon
The Tankadere in the typhoon

But John Bunsby believed in the “Tankadere,” which rode on the waves like a seagull; and perhaps he was not wrong.

Chapter XXI

Days 43–64 of 80

VI From Yokohama to San Francisco

Engraving by de Neuville or Benett: The human pyramid of the Long Noses at Yokohama
The human pyramid of the Long Noses at Yokohama

…the pyramid tottered, the balance was lost, one of the lower noses vanished from the pyramid, and the human monument was shattered like a castle built of cards!

Chapter XXIII

Days 65–71 of 80

VII From San Francisco to New York

Engraving by de Neuville or Benett: A sledge with sails across the frozen plains
A sledge with sails across the frozen plains

The sledge sped on as lightly as a boat over the waves.

Chapter XXXI

Days 72–80 of 80

VIII From New York to London

Engraving by de Neuville or Benett: Back at the Reform Club
Back at the Reform Club

…the pendulum had not beat the sixtieth second when Phileas Fogg appeared, followed by an excited crowd who had forced their way through the club doors, and in his calm voice, said, “Here I am, gentlemen!”

Chapter XXXVI

Phileas Fogg had, without suspecting it, gained one day on his journey, and this merely because he had travelled constantly eastward. Chapter XXXVII

also called section tracking · active-anchor highlight · reading position

That rootMargin collapses the viewport to a thin band across its middle, so “current” means what is at eye level rather than what merely happens to be on screen. The index pinned to the top of this page is one. The index is only links to the eight legs, grouped: scroll-target-group makes the browser keep track of which target you have reached, and the timetable styles itself from that, with no observer and no script. The links still work as links. Fogg believed he had come home a day late; travelling east, he had seen eighty sunrises while London saw seventy-nine, and he had won.

How it is built.plan ol { scroll-target-group: auto } /* its links become markers for the sections */ .plan a:target-current { color: var(--ink) } /* the leg you are on */ .plan a:target-before::before { content: '✓' } /* the legs behind you */ .plan a:target-after { opacity: .45 } /* the legs ahead */

In full, on GitHub index.html showcase.css

Engravings — Alphonse de Neuville and Léon Benett, for the illustrated French edition of Le Tour du monde en quatre-vingts jours; public domain, via Wikimedia Commons: the wager at the reform club, passepartout in the pagoda on malabar hill, across india on the elephant kiouni, fix and passepartout in a hong kong tavern, the tankadere in the typhoon, the human pyramid of the long noses at yokohama, a sledge with sails across the frozen plains, back at the reform club, and the route map. Text — the translation by George Makepeace Towle. Facts — Around the World in Eighty Days; the Towle translation at Project Gutenberg.