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 diamiondHatch = acgraph.hatchFill("diamiond", "#CC8800 0.8");
4
var verticalBrickHatch = acgraph.hatchFill("verticalbrick", "green");
5
6
stage.rect(100, 10, 400, 40).fill(diamiondHatch);
7
stage.rect(100, 90, 400, 40).fill(verticalBrickHatch);
8
stage.rect(100, 170, 400, 40).fill(diamiondHatch);
9
stage.rect(100, 240, 400, 40).fill(verticalBrickHatch);
10
stage.rect(100, 310, 400, 40).fill(diamiondHatch);