Generally the easiest way to accomplish the correct layout is to create HTML elements that "contain" the top and bottom screens. Here's an example:
+
通常最简单的正确布局是创建包含双屏的HTML元素,比如这样:
<!DOCTYPE html>
<!DOCTYPE html>
Line 123:
Line 123:
</head>
</head>
<body>
<body>
−
<div id="topscreen">Top Screen</div>
+
<div id="topscreen">上屏</div>
−
<div id="bottomscreen">Bottom Screen</div>
+
<div id="bottomscreen">下屏</div>
</body>
</body>
</html>
</html>
−
This scheme allows the page to be easily manipulated through JavaScript. In order to have the window snap to the correct position, use the following JavaScript code: