Skip to content
プロジェクト

概要

任意の画像を純粋なCSSに変換します。box-shadowだけで画像を再現します。

Web・アプリ開発

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
+1
1か月
+10

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

img2css

Convert any image to pure CSS.

img2css

How does it work?

It has two different outputs, pure css shadow matrix [1] and base64 embedded image [2].

  • Pure CSS: This output was created by resizing and setting each pixel as a box-shadow of a single pixel div, so no img tag or background-image is needed. This can result in huge outputs, and the use of this output is not recommended for production unless there is no other option.
  • Base64: The entire image file is embedded inside the <img> tag using base64, so no need external hosting is needed.

Development

pnpm install
pnpm dev

pnpm build writes the static site to out/. Pushing to main deploys it to the gh-pages branch, which javier.xyz/img2css serves.

関連プロジェクトを探す

読み込み中…