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 rect1 = stage.rect(10, 10, 100, 40);
4
rect1.fill('#F44336');
5
6
var rect2 = stage.rect(20, 20, 100, 40);
7
rect2.fill('#2196F3');
8
9
// Blue rectangle is made invisible.
10
rect2.visible(false);