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(50, 130, 150, 75);
4
rectangle.attr('fill', '#A5D6A7');
5
6
// Get attribute.
7
var rectFill = rectangle.attr('fill');
8
9
var greenCircle = stage.circle(130, 70, 45);
10
greenCircle.fill(rectFill);