Advertisement
Pihtija

SKI V3

Nov 6th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. svg.html
  2. ---------------------
  3.  
  4. <!DOCTYPE html>
  5. <html lang="en">
  6. <head>
  7. <meta charset="UTF-8">
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  10. <title>SVG</title>
  11. </head>
  12. <body>
  13. <svg width="500" height="500" style="border:1px solid black;">
  14. <!-- <rect x="20" y="20" rx="20" ry="20" width="100" height="80" style="fill:red; stroke:green">
  15.  
  16. </rect>
  17.  
  18. <polygon points="180,90 120,278 270,158 90,158 240,278" style="fill:green; stroke:yellow;">
  19. <animatetransform attributeName="transform" type="rotate" from="0 180 185" to="360 180 185" dur="5s"></animatetransform>
  20. </polygon>
  21.  
  22. <circle cx="60" cy="50" r="30">
  23. <animate attributename="cx" from="60" to="460" dur="3s" repeatCount="indefinite">
  24.  
  25. </animate>
  26. </circle> -->
  27. <circle cx="30" cy="30" r="25" style="stroke: none; fill: #0000ff;">
  28.  
  29. <animate attributeName="cy" attributeType="XML" from="0" to="525" begin="0s" dur="3s"
  30. repeatcount="indefinite" />
  31.  
  32. <set attributeName="cx" attributeType="XML" to="90" begin="3s" />
  33.  
  34.  
  35.  
  36.  
  37.  
  38. </circle>
  39.  
  40. </svg>
  41. </body>
  42. </html>
  43.  
  44. ---------------------
  45. canvas.html
  46. ---------------------
  47. <!DOCTYPE html>
  48. <html lang="en">
  49. <head>
  50. <meta charset="UTF-8">
  51. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  52. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  53. <title>Vezba 3</title>
  54. </head>
  55. <body>
  56. <canvas id="kanvas1" width="500px" height="500px" style="border:1px solid black;"></canvas>
  57.  
  58.  
  59. <script>
  60. var c=document.getElementById("kanvas1");
  61. var ctx=c.getContext("2d");
  62.  
  63. // var grd1=ctx.createLinearGradient(0,0,300,0);
  64. // grd1.addColorStop(0,"green");
  65. // grd1.addColorStop(1,"yellow");
  66.  
  67. // ctx.fillStyle=grd1;
  68. // ctx.fillRect(0,0,300,150);
  69.  
  70.  
  71. // var grd2=ctx.createRadialGradient(150,275,40,150,275,150);
  72. // grd2.addColorStop(0,"green");
  73. // grd2.addColorStop(0.2,"purple")
  74. // grd2.addColorStop(0.5,"cyan");
  75. // grd2.addColorStop(0.7,"maroon");
  76. // grd2.addColorStop(0.9,"yellow")
  77. // grd2.addColorStop(1,"brown");
  78.  
  79. // ctx.fillStyle=grd2;
  80. // ctx.fillRect(0,200,300,150);
  81.  
  82. // ctx.font="40px Arial";
  83. // ctx.shadowColor="red";
  84. // ctx.shadowOffsetX=2;
  85. // ctx.shadowOffsetY=2;
  86. // ctx.shadowBlu r=4;
  87. // ctx.fillText("Popunjen text", 50,50);
  88. // ctx.strokeText("Nepopunjen text", 50, 150);
  89.  
  90.  
  91. ctx.translate(70,30);
  92.  
  93.  
  94. ctx.rotate(45*Math.PI/180);
  95. ctx.fillRect(0,0,150,90);
  96. ctx.font="40px Arial";
  97. ctx.fillStyle="yellow"
  98. ctx.fillText("Viser",0,50);
  99.  
  100.  
  101. </script>
  102. </body>
  103. </html>
  104.  
  105. ------------------------------
  106. output.html
  107. ------------------------------
  108. <!DOCTYPE html>
  109. <html lang="en">
  110. <head>
  111. <meta charset="UTF-8">
  112. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  113. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  114. <title>Document</title>
  115. </head>
  116. <body>
  117. <form oninput="x.value=parseInt(a.value)+parseInt(b.value)">
  118. <input type="range" id="a" value="50" min="10" max="100">+
  119. <input type="number" id="b" value="50">
  120. =<output name="x" for="a b"></output>
  121. </form>
  122. </body>
  123. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement