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
stage.width(120);
3
stage.height(25);
4
stage.rect(0, 0, 120, 25);
5
6
var simpleText = stage.text(0, 5, 'Simple text');
7
8
// Sets direction.
9
simpleText.direction('rtl');
10
simpleText.width(stage.width());
11
simpleText.height(stage.height());