开发者

How to rotate a div

I'm developing a board game and would like to know how i can use css or JavaScript to dynamically rotate a div so that each player can play from bottom up.

Player One

How to rotate a div


P开发者_如何学Pythonlayer Two

How to rotate a div


From earlier stackoverflow post:

Cross-browser way to flip html/image via Javascript/CSS?

.flip-vertical {
    -moz-transform: scaleY(-1);
    -webkit-transform: scaleY(-1);
    transform: scaleY(-1);
    filter: flipv; /*IE*/
}


If you want to rotate the image 180 degrees and then expect dragging and dropping to work, you need to be a little less lazy and just code the thing from each user's perspective IMO.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜