all tutorials about web design and programming in pdf format
This tutorial will guide you through the following steps:
<svg width="100" height="100">
<circle cx="50" cy="50" r="40"
stroke="red" stroke-width="4" fill="blue" />
</svg>
<svg width="200" height="100">
<rect width="200" height="100" stroke="red" stroke-width="5" fill="blue" />
</svg>
<svg height="200">
<line x1="0" y1="0" x2="200" y2="100"
stroke="blue" stroke-width="5"/>
</svg>
<svg height="200">
<ellipse cx="110" cy="55" rx="100" ry="45" stroke="red" stroke-width="5" fill="blue" />
</svg>
<svg height="200"> <polygon points="20,100 300,70, 120,50" stroke="red" stroke-width="5" fill="blue" /> </svg>
<svg height="200">
<polyline points="10,10 20,80 100,90 80,80 80,100" fill="blue" />
</svg>
<svg height="200">
<defs>
<radialGradient id="gradient" cx="50%" cy="50%" r="50%"
fx="50%" fy="50%">
<stop offset="0%" style="stop-color:rgb(200,200,200);
stop-opacity:0"/>
<stop offset="100%" style="stop-color:rgb(0,0,255);
stop-opacity:1"/>
</radialGradient>
</defs>
<rect x="10" y="10" height="150" width="150"
style="stroke:red; stroke-width:5; fill: blue; fill:url(#gradient)" />
</svg>
CANVAS <canvas> is element in HTML5 that allows us to draw graphics and animations on web browsers using JavaScript.
<canvas id="myCanvas" height="200" width="300"></canvas>
<script>
window.addEventListener('load', function () {
var
img = new Image,
ctx = document.getElementById('myCanvas').getContext('2d');
img.src = 'https://itpresent.com/web/tutorials/pdf/images/loves.png';
img.addEventListener('load', function () {
var interval = setInterval(function() {
var x = 0, y = 20;
return function () {
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
ctx.drawImage(img, x, y);
x += 1;
if (x > ctx.canvas.width) {
x = 0;
}
};
}(), 1000/150);
}, false);
}, false);
</script>