开发者

Scroll scrollbar in browser without using window.scrollBy

I am trying to create a board game using html/css/javascript to be played on the iphone. My board is a 2d grid 开发者_Python百科designed using a table with 128 elements both in height and width and each element is 128x128px. I want the game to start in the center of the board. That is the vertical and horizontal scrollbars roughly in the center of the screen. I've tried it using javascripts window.scrollBy function but this dosen't seem to work in the iPhones browser. Is there any other way I can achieve this


window.scrollTo(x,y);

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜