↓ scroll ↑

This is

A Pure CSS Scroll-Based Reading Progress Bar

By
on

History

Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML).[1] CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.[2]

CSS is designed to enable the separation of content and presentation, including layout, colors, and fonts.[3] This separation can improve content accessibility; provide more flexibility and control in the specification of presentation characteristics; enable multiple web pages to share formatting by specifying the relevant CSS in a separate .css file, which reduces complexity and repetition in the structural content; and enable the .css file to be cached to improve the page load speed between the pages that share the file and its formatting.

Separation of formatting and content also makes it feasible to present the same markup page in different styles for different rendering methods, such as on-screen, in print, by voice (via speech-based browser or screen reader), and on Braille-based tactile devices. CSS also has rules for alternate formatting if the content is accessed on a mobile device.[4]

The name cascading comes from the specified priority scheme to determine which style rule applies if more than one rule matches a particular element. This cascading priority scheme is predictable.

The CSS specifications are maintained by the World Wide Web Consortium (W3C). Internet media type (MIME type) text/css is registered for use with CSS by RFC 2318 (March 1998). The W3C operates a free CSS validation service for CSS documents.[5]

In addition to HTML, other markup languages support the use of CSS including XHTML, plain XML, SVG, and XUL. CSS is also used in the GTK widget toolkit.

Use

Before CSS, nearly all presentational attributes of HTML documents were contained within the HTML markup. All font colors, background styles, element alignments, borders, and sizes had to be explicitly described, often repeatedly, within the HTML. CSS lets authors move much of that information to another file, the style sheet, resulting in considerably simpler HTML.

For example, headings (h1 elements), sub-headings (h2), sub-sub-headings (h3), etc., are defined structurally using HTML. In print and on the screen, choice of font, size, color and emphasis for these elements is presentational.

Before CSS, document authors who wanted to assign such typographic characteristics to, say, all h2 headings had to repeat HTML presentational markup for each occurrence of that heading type. This made documents more complex, larger, and more error-prone and difficult to maintain. CSS allows the separation of presentation from structure. CSS can define color, font, text alignment, size, borders, spacing, layout and many other typographic characteristics, and can do so independently for on-screen and printed views. CSS also defines non-visual styles, such as reading speed and emphasis for aural text readers. The W3C has now deprecated the use of all presentational HTML markup.[16]

A Different Kind of
Fixed Positioning

By varying how much the element translates vertically with the scroll position.

Ingrid H.
Joined in 2019
Meet Ingrid, a product manager with a wanderlust for travel. When not innovating UX, she explores landscapes and immerses in vibrant cultures worldwide.
Sarah D.
Joined in 2013
Sarah is a talented website designer who finds inspiration in nature. She crafts stunning websites for her clients, incorporating elements inspired by the natural world.
Marek G.
Joined in 2021
Marek is a talented coder who embraces programming challenges and conquers long-distance runs with focus and endurance.
Naija K.
Joined in 2018
Naija, skilled UX designer merges gaming passion with expertise, creating engaging interfaces and pushing boundaries to enhance gaming through understanding player behavior.
Josh Q.
Joined in 2017
Josh is a web developer who loves coding and cooking. His culinary creations are as beautiful as his websites. Josh's creativity has no limits in both coding and cooking.
René S.
Joined in 2017
Meet René, a passionate QA engineer who excels at software testing and skiing. René's expertise lies in ensuring excellence in code and conquering mountains, both digitally and in person.

Simple parallax

I'm not  triggered