In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to write a super gorgeous HTML 5 page". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to write a super gorgeous HTML 5 page".
Super gorgeous html5 page
The super gorgeous html5 page _ 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 and draw black rect (default) c.globalCompositeOperation = "lighter" / / switch to additive color application c.lineWidth = 0.2 round / set the size of the brush c.lineCap = "round"; / / set smooth var bool = 0, t = 0; / / theta canvas.onmousemove = function (e) {if (window.T) {D=Math.random () * 15; f (1);} clearTimeout (T);} X = e.pageX; / / grab mouse pixel coords Y = e.pageY; astat0 / / previous coord.x bust 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; U=e.pageX/H * 9; g = 360 * Math.PI / 180; T = setInterval (f = function (e) {c.save (); c.globalCompositeOperation = "source-over" If (estrangement 1) {c.fillStyle = "rgba (0, W, H);} c.restore (); I = 25; while (I -) {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-1) * t; x = (R-r) * C (t) + D * C (Q) + (A + (X-A) * (I / 25)) + (r-R) / center on xy coords y = (R-r) * S (t)-D * S (Q) + (B + (Y-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) {aquibiz0; R + = 0.05} canvas.onmousemove ({pageX:300, pageY:290})}
Thank you for your reading, the above is the content of "how to write super gorgeous HTML 5 pages". After the study of this article, I believe you have a deeper understanding of how to write super gorgeous HTML 5 pages, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.