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);
精彩评论