HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
var stage = acgraph.create('container');
2
3
var rectangle = stage.rect(10, 10, 100, 100);
4
rectangle.cursor('crosshair');
5
rectangle.fill('#90CAF9');
6
7
// Gets cursor type.
8
var cursorType = rectangle.cursor();
9
10
var simpleText = stage.text();
11
simpleText.x(10);
12
simpleText.y(130);
13
simpleText.text('Cursor type is ' + cursorType);
14
simpleText.fontSize(12);