https://github.com/labnol/img2css
convert arbitrary images into huge, browser-crashing CSS box-shadow settings
https://github.com/labnol/img2css
Last synced: over 1 year ago
JSON representation
convert arbitrary images into huge, browser-crashing CSS box-shadow settings
- Host: GitHub
- URL: https://github.com/labnol/img2css
- Owner: labnol
- Created: 2012-09-25T21:31:25.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-08-20T04:20:34.000Z (almost 14 years ago)
- Last Synced: 2025-03-30T15:46:53.605Z (over 1 year ago)
- Language: JavaScript
- Size: 89.8 KB
- Stars: 4
- Watchers: 0
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
img2css
=======
Convert arbitrary images into huge, browser-crashing CSS box-shadow settings.
Example
-------
[http://rmer.info/css\_mona\_lisa.html](http://rmer.info/css_mona_lisa.html) (your browser will likely not be happy with your decision to visit this link).
Usage
-----
* Don't, obviously
But I want to
-------------
* Edit img2css.js, change "img.src = 'mona.jpg'" to point to some (local) image resource you would like to make much more unwieldy
* Point a recent version of Firefox at example.html. The initial rendering seems to only work in Firefox, but the generated CSS "works" broadly among modern browsers
* You should see two copies of your image, possibly after a lengthy wait. Inspect the second one with Firebug to get a copy of its CSS attribute
* Dump the CSS into your stylesheet, under say .mona-lisa, go nuts