DEV Community

Cover image for Drawing a single-element dollar bill with CSS and JavaScript

Drawing a single-element dollar bill with CSS and JavaScript

Alvaro Montoro on April 24, 2020

This is more of a just-for-laughs tongue-in-cheek post, do not take the content of it as advice for anything, it was just an entertaining way to pr...
Collapse
 
aashutoshrathi profile image
Aashutosh Rathi

This post could literally be titled as "Making Money using JS and CSS"

Collapse
 
alvaromontoro profile image
Alvaro Montoro

I had one job 😓

Is it too late to change it?

Collapse
 
marqueymarc profile image
marc meyer

Well, congratulations on building an image just by using box-shadows, but need I point out that you get a much better gif at full size with only about 90k and an amazing one at 4-500k, vs. I think 1mb of text encoded box-shadow values for a glitchy smaller one?
Kinda like saying I figured out how to not get my can opener dirty while opening a can of tuna, using my teeth, and I only sliced off half my nose.

I'm sure I'm missing something.

Collapse
 
alvaromontoro profile image
Alvaro Montoro

Some people practice web technologies by building grandiose projects aimed at making millions of dollars, and some other people practice web technologies by building goofy projects aimed at learning and having fun... just making a single fake dollar. I guess I'm part of the latter ¯_(ツ)_/¯

Collapse
 
marqueymarc profile image
marc meyer

Understood, and good going! You're right about learning, of course!

Collapse
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

Now make it rain :P

Collapse
 
alvaromontoro profile image
Alvaro Montoro

Not a single element and invalid HTML, but the closest I could do in a couple of minutes: codepen.io/alvaromontoro/pen/xxwdKbz

Collapse
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

I was totally joking btw, but you delivered anyway :D

It's beautiful, lol.

Collapse
 
ameedjamous profile image
Ameed Jamous

Love it!

Collapse
 
rafaelcastrocouto profile image
@racascou

Loved the delta trick in order to reduce the box-shadow, really smart 👏👏👏

Collapse
 
felipperegazio profile image
Felippe Regazio

Haha very smart : )

Collapse
 
mustapha profile image
Mustapha Aouas

Awesome