mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 17:16:12 +00:00
c1cb654e54
--HG-- rename : layout/reftests/css-gradients/radial-ref.html => layout/reftests/css-gradients/radial-1-ref.html rename : layout/reftests/css-gradients/radial.html => layout/reftests/css-gradients/radial-1a.html rename : layout/reftests/css-gradients/twostops-ref.html => layout/reftests/css-gradients/twostops-1-ref.html rename : layout/reftests/css-gradients/twostops.html => layout/reftests/css-gradients/twostops-1a.html
17 lines
339 B
HTML
17 lines
339 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<body>
|
|
<canvas id="canvas" width="300" height="300"/>
|
|
<script>
|
|
var ctx = document.getElementById('canvas').getContext('2d');
|
|
|
|
var grad = ctx.createLinearGradient(150,0,150,300);
|
|
grad.addColorStop(0, 'white');
|
|
grad.addColorStop(1, 'black');
|
|
|
|
ctx.fillStyle = grad;
|
|
ctx.fillRect(0,0,300,300);
|
|
</script>
|
|
</body>
|
|
</html>
|