HTML:
offline TetrisThere’s proprietary Apple markup on our HTML5 page. A brief explanation of each:
apple-mobile-web-app-capable: This is another tip-off that we want to be an offline app.
apple-mobile-web-app-status-bar-style: This hides the status bar, and nav bar when the app is offline.
apple-touch-icon:This is the pointer to the image that want to be the icon.
apple-touch-startup-image: This is a url pointing to the startup image.
Also note that you should put CSS at the top and JavaScript at the bottom (best practices still apply here).
CSS:
body {
overflow:hidden;
background: #d7d7d7;
margin:0;
padding:0;
}
#tetris {
width: 320px;
height: 460px;
background:#000;
}
The style is really just to the
div element on our web page to make sure it fits in the iPhone’s viewport properly.
基本就这么多!