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 simpleLayer = acgraph.layer();
4
5
simpleLayer.ellipse(85, 80, 35, 55);
6
simpleLayer.rect(55, 59, 185, 45);
7
simpleLayer.star7(55, 79, 45);
8
9
// Shows only element with index==2.
10
var element = simpleLayer.getChildAt(2);
11
element.parent(stage);