怎么编写超级绚丽的HTML5的页面

这篇文章主要讲解了“怎么编写超级绚丽的HTML 5的页面”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么编写超级绚丽的HTML 5的页面”吧!

我们提供的服务有:网站建设、做网站、微信公众号开发、网站优化、网站认证、雁峰ssl等。为上1000家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的雁峰网站制作公司

超级绚丽的html5的页面

<!DOCTYPE html> <html xmlns=”http://www.w3.org/1999/xhtml” lang=”en”> <head> <title>超级绚丽的html5的页面</title> <script type=”text/javascript”> window.onload = function () {  C = Math.cos;  S = Math.sin;  U = 0;  canvas = document.getElementById(“myCanvas”);  c = canvas.getContext(“2d”);  var W = canvas.width = window.innerWidth;  var H = canvas.height = window.innerHeight;  c.fillRect(0, 0, W, H); // resize <canvas> and draw black rect (default)  c.globalCompositeOperation = “lighter”; // switch to additive color application  c.lineWidth = 0.2;//设置画笔的大小  c.lineCap = “round”;//设置圆滑  var bool = 0,  t = 0; // theta  canvas.onmousemove = function (e) {  if(window.T) {  if(D==9) {  D=Math.random()*15; f(1); }  clearTimeout(T);  }  X = e.pageX; // grab mouse pixel coords  Y = e.pageY;  a=0; // previous coord.x  b=0; // previous coord.y  A = X, // original coord.x  B = Y; // original coord.y  R=(e.pageX/W * 999>>0)/999;  r=(e.pageY/H * 999>>0)/999;  U=e.pageX/H * 360 >>0;  D=9;  g = 360 * Math.PI / 180;  T = setInterval(f = function (e) {  c.save();  c.globalCompositeOperation = “source-over”;  if(e!=1) {  c.fillStyle = “rgba(0,0,0,0.02)”;  c.fillRect(0, 0, W, H);  }  c.restore();  i = 25; while(i &ndash;) {  c.beginPath();  if(D > 450 || bool) { // decrease diameter  if(!bool) { // has hit maximum  bool = 1;  }  if(D < 0.1) { // has hit minimum  bool = 0;  }  t -= g; // decrease theta  D -= 0.1; // decrease size  }  if(!bool) {  t += g; // increase theta  D += 0.1; // increase size  }  q = (R / r &ndash; 1) * t;  x = (R &ndash; r) * C(t) + D * C(q) + (A + (X &ndash; A) * (i / 25)) + (r &ndash; R); // center on xy coords  y = (R &ndash; r) * S(t) &ndash; D * S(q) + (B + (Y &ndash; B) * (i / 25));  if (a) {  c.moveTo(a, b);  c.lineTo(x, y)  }  c.strokeStyle = “hsla(” + (U % 360) + “,100%,50%,0.75)”; // draw rainbow hypotrochoid  c.stroke();  a = x; // set previous coord.x  b = y; // set previous coord.y  }  U -= 0.5; // increment hue  A = X; // set original coord.x  B = Y; // set original coord.y  }, 16);  }  document.onkeydown = function(e) { a=b=0; R += 0.05 }  canvas.onmousemove({pageX:300, pageY:290})  }</script> </head> <body style=”margin:0px;padding:0px;width:100%;height:100%;overflow:hidden;”> <canvas id=”myCanvas”></canvas> </body> </html>

怎么编写超级绚丽的HTML 5的页面

感谢各位的阅读,以上就是“怎么编写超级绚丽的HTML 5的页面”的内容了,经过本文的学习后,相信大家对怎么编写超级绚丽的HTML 5的页面这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!

当前文章:怎么编写超级绚丽的HTML5的页面
网页URL:https://www.cdcxhl.com/article4/ghsgie.html

成都网站建设公司_创新互联,为您提供网站策划全网营销推广网站内链网页设计公司外贸建站外贸网站建设

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

搜索引擎优化