Blog2015 ≫ Nice html5 deck of cards

A simple playing card out of a single html element with css

Saw this1 yesterday on hackernews2 and it got me thinking about the css, I think I can make a playing card out of a single element like

<card value="A" suit=""></card>

to make

if that works here the css is then

/* playing card css used to be here, but I've lost it, sorry */

Maybe over simplified for cross browser support though... unicode characters in css selectors looks a bit rum, as does having arbitrary elements like "card" there. This is probably too wacky to be of any use.

💬 Looking good, greetings from Finland! ;)

⬅️ :: ➡️

Paul Clarke's weblog - I live in A small town, Kent. Wed and dad to two, I am a full-stack web engineer, + I do js / nodejs, some ruby, other languages ect ect. I like pubs, running, eating, home-automation + other diy jiggery-pokery, history, family tree stuff, Television, squirrels, pirates, lego, + TIME TRAVEL.