📄 scroll.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Scrolling the canvas</title>
<link REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</head>
<script language="javascript" src="../applet/applet.js"></script>
<body>
<a href="./index.htm">CONTENTS</a>
<h3>Scrolling the canvas.</h3>
<!-- Not compatible with Netscape 4.x ! ) -->
<p>The <a href="placing.htm#DrawCanvas">DrawingCanvas</a> applet has not built-in scroll capabilities
however you can use HTML tag <b><div></b> with the style property <b>overflow</b> for scrolling.</p>
<p>Example:</p>
<div style="overflow:auto;width:400;height:300;" >
<script language="javascript"><!--
// We use JavaScript to output the applet tag
// due to the IE security issue descibed here:
// http://izhuk.com/docs/ie7fix.html
var painter = new Applet();
painter.attr['archive'] = 'painter.jar';
painter.attr['codebase'] = '../applet';
painter.attr['code'] = 'DrawCanvas.class';
painter.attr['width'] = 640;
painter.attr['height'] = 480;
painter.attr['name'] = 'canvas';
painter.write();
//--></script>
</div>
<p>Corresponding DHTML code</p>
<pre>
<b><div style="overflow:auto;width:400;height:300;"></b>
<applet width="640" height="480" code="DrawCanvas.class"
codebase="../applet" archive="painter.jar" name="canvas" >
</applet>
<b></div></b>
</pre>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -