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, 30, 150, 100);
4
rectangle.stroke('#2196F3', 5);
5
6
// Gets stroke.
7
var stroke = rectangle.stroke();
8
9
stage.text(10, 5, 'Stroke thickness: ' + stroke.thickness);