DPiCSS

Details Player for Image with CSS. A tiny CSS library to display animated or higher definition images on click

Olivier 3lanc

Table of content
  1. Installation
  2. How it works

The main idea behind DPiCSS is to beautifully display large-sized images or animated images only on user demand without bloating and reducing page performances.

The thumbnail Poppy cinemagraph Large sized animated image

Here is a simple usage example of DPiCSS © Olive White Photographies

DPiCSS achieves this combining modern native HTML5 and CSS features:

Installation

Just include the CSS file dpicss.css into the page.

CDN:

https://cdn.jsdelivr.net/gh/olivier3lanc/dpicss/dist/dpicss.css

npm:

npm install dpicss

Local:

git clone git@github.com:olivier3lanc/dpicss.git
cd dpicss
npm install
npx @11ty/eleventy --serve

Now you can go to usage.

How it works

The following demo logs what happens during the multiple steps to the final display of the large sized image:

The thumbnail A simple log to monitor what happens:
🕙 Waiting for thumbnail into the viewport
Large sized animated image