News for hackers. Stuff that matters.
Re:HTML5 Deck of Cards by retrogradeorbit on Thursday September 03, 2015 @10:36AM (#10165157)
There's one card face missing. That's the back! A nice card back might be a more difficult challenge to do in HTML5.
Re:HTML5 Deck of Cards by adam12 on Thursday September 03, 2015 @10:58AM (#10165268)
It's done in CSS3 + JS, so it should be pretty easy.

https://desandro.github.io/3dtransforms/examples/card-01.htm...

#card.flipped { -webkit-transform: rotateY( 180deg ); -moz-transform: rotateY( 180deg ); -o-transform: rotateY( 180deg ); transform: rotateY( 180deg ); }

Re:HTML5 Deck of Cards by kenbellows on Thursday September 03, 2015 @12:13PM (#10165764)
Sure but implementing the card back image is more difficult, which is what I think the parent post was getting at, rather than the flipping itself. The rest of the page is implemented without any images, which is neat; you'd have to work some SVG magic or something to create e.g. a Bicycle-esque card back without loading an image.
Re:HTML5 Deck of Cards by jameshart on Thursday September 03, 2015 @01:22PM (#10166231)
http://lea.verou.me/css3patterns/ could provide a pretty good source for patterned card backs.
Re:HTML5 Deck of Cards by adam12 on Thursday September 03, 2015 @03:43PM (#10167087)
Re:HTML5 Deck of Cards by pakastin on Thursday September 03, 2015 @06:03PM (#10167796)
Thanks, that's great source!
Re:HTML5 Deck of Cards by adam12 on Thursday September 03, 2015 @03:52PM (#10167129)
Displaying an image on a web page shouldn't be that difficult.

I like the svg suggestion.

https://commons.wikimedia.org/wiki/Category:SVG_playing_card...

https://upload.wikimedia.org/wikipedia/commons/d/d4/Card_bac...

Re:HTML5 Deck of Cards by kenbellows on Friday September 04, 2015 @06:27AM (#10169609)
It's not about difficulty, it's just fun to try and do it with only web elements, and bonus points for strictly CSS
Re:HTML5 Deck of Cards by pkstn on Thursday September 03, 2015 @06:01PM (#10167787)
I don't see any problem using couple of SVG image files for example.. The problem is that I'm not such a great drawer myself. In the first version I just used big J, Q, K like this: http://pakastin.fi/cards_2006
Re:HTML5 Deck of Cards by chrisseaton on Thursday September 03, 2015 @12:12PM (#10165746)
He means drawing the complex decorative design on the back of most cards.
Re:HTML5 Deck of Cards by ricket on Thursday September 03, 2015 @12:49PM (#10165968)
I had the same thought. You could practice magic tricks if you could flip over the deck and then shuffle and fan it! "Pick a card, any card!"
Re:HTML5 Deck of Cards by pakastin on Thursday September 03, 2015 @06:06PM (#10167805)
I will add flipping ;)

Only thing about is that it easily looks like crap. I mean if you don't curl & flip the card looks too solid..but I'll check it out.

Re:HTML5 Deck of Cards by derrickdirge on Thursday September 03, 2015 @02:05PM (#10166554)
This would only work for a very small subset of card tricks.

It would be difficult to practice sleight of hand.

Re:HTML5 Deck of Cards by pakastin on Sunday September 13, 2015 @01:41PM (#10212120)
Re:HTML5 Deck of Cards by teddyh on Thursday September 03, 2015 @12:15PM (#10165774)
The two joker card are also missing for it to be a complete deck.
Re:HTML5 Deck of Cards by pakastin on Sunday September 06, 2015 @06:50PM (#10179388)
Try clicking all kings in a row.. ;)
Re:HTML5 Deck of Cards by pkstn on Thursday September 03, 2015 @02:20PM (#10166662)
:D