Live data from Hacker News

HTML5 Deck of Cards

pakastin.github.io

141–150 of 165 posts

Re: HTML5 Deck of Cards

#145
post #40

Earlier quoted context omitted.

Great work, I love this. Here is a quick playing card example with pseudo elemenets view-source: http://www.clarkeology.com/card.html

That’s nice CSS but the HTML is so borked… why not ︎ Or something?

I did have that originally, but worked in my browser so i ran with it... I'm sure card[suit=$] with a unicode character is not super widely supported css anyway...

Re: HTML5 Deck of Cards

#146
post #101

Earlier quoted context omitted.

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.

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...

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

#147

Great work. There's a couple of small issues. First, regardless of where you click on a card, when you start dragging the card will jump so that its centre is at the cursor position. Second, there is a mismatch on the Z-index used for dragging and that used when a card is dropped into place.

Will fix those.. Actually dragging start is "sort of" fixed already.

Re: HTML5 Deck of Cards

#148

Loved it :).Animations are beautiful, will be using them soon in card game I am developing. Thanks for releasing it at the right time for me.

Glad to hear! Would love if you'd share your work with me. I'm on Twitter @pakastin ;)

Re: HTML5 Deck of Cards

#150

gorgeous! really fine work. (granted i have no design talent, though i did work for an online poker shop for six years and i have played a lot of poker with friends and a lot house poker in casinos. particularly awesome is "sort", which i think really nicely simulates a (reverse) shuffle; it seemed like i could see the top edge of the cards lift as they rotated along the bottom edge

Thanks! Next I need to make a game out of this :)
Post reply on HN