【編程遊戲】賀歲霓虹燈。(第一名獎勵10000可用分)
效果圖
評分
參觀 [目前Firefox中好使,其他瀏覽器需複製到本地,存爲html文件看效果] <!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> <html> <head> <title>javascript霓虹燈 - 新年快樂Happy New Year</title> <!--meta http-equiv="content-type" content="text/html; charset=utf-8"--> <meta name="author" content="dh20156@www.w3cgroup.com" /> <meta name="keywords" content="javascript,霓虹燈" /> <meta name="description" content="新年快樂Happy New Year" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <style type="text/css"> html,body{background:#000;text-align:center;} .neon{border:none;} .neon *{margin:0;padding:0;} .neon td{font-size:0;line-height:0;} .vneon td{background:red;width:2px;height:238px;} .hneon td{background:blue;width:798px;height:2px;} .wrap{width:800px;height:240px;margin:0 auto;position:relative;} #txt{margin:0;position:absolute;left:0;top:0;z-index:3;font-family:verdana;font-size:60px;color:white;width:798px;text-align:center;height:238px;line-height:238px;filter:glow(color=red,Strength=8);} #vneon{position:absolute;left:0;top:0;z-index:2;} #hneon{position:absolute;left:0;top:0;z-index:1;} </style> </head> <body> <div class="wrap"> <h1 id="txt">HappyNewYear<sup>新年快樂</sup></h1> <div id="vneon">vneon</div> <div id="hneon">hneon</div> </div> </body> <script type="text/javascript"> var hsb2rgb = function(h,s,b){var nH,nS,nV,nR,nG,nB,hi,f,p,q,t;nH=h/360,nS=s/100,nV=b/100;if(!s){nR=nV*255|0,nG=nV*255|0,nB=nV*255|0;nR=(nR<0)?0:nR,nG=(nG<0)?0:nG,nB=(nB<0)?0:nB;return[nR,nG,nB];}hi=nH*6;if(hi==6){hi=0;}f=hi|0,p=nV*(1-nS),q=nV*(1-nS*(hi-f)),t=nV*(1-nS*(1-(hi-f)));switch(f){case 0:nR=nV,nG=t,nB=p;break;case 1:nR=q,nG=nV,nB=p;break;case 2:nR=p,nG=nV,nB=t;break;case 3:nR=p,nG=q,nB=nV;break;case 4:nR=t,nG=p,nB=nV;break;default:nR=nV,nG=p,nB=q;break;}nR=nR*255|0,nG=nG*255|0,nB=nB*255|0;nR=(nR<0)?0:nR,nG=(nG<0)?0:nG,nB=(nB<0)?0:nB;return[nR,nG,nB];}; var newcanvas = function(c,r){var std = new Array(c+1).join('<td></td>');var str = new Array(r+1).join('<tr>'+std+'</tr>');return '<table cellspacing="2" cellpadding="0">'+str+'</table>';}; var neonEffect = { chromatogram:function(h,speed,showtimer){ var starth = isNaN(h)?0:(h>360)?0:(h<0)?0:h,speed = speed||10,me = this,srgb = 'rgb('+hsb2rgb(starth,100,100).join(',')+')'; this.style.background = srgb; var show = function(){ if(starth>=360){starth = 0;} var srgb = 'rgb('+hsb2rgb(starth,100,100).join(',')+')'; me.style.background = srgb; starth+=speed; showtimer = window.setTimeout(arguments.callee,1); }; show(); } }; var neon = function(type,effect){ this.stype = ['neon vneon','neon hneon'][(isNaN(type)?0:type>1?1:type)]; this.className = this.stype; this.effect = effect||'chromatogram'; this.afterin = null; this.afterout = null; this.showtimer = null; this.setalpha = function(iopacity){ this.style.opacity = iopacity/100; this.style.filter = 'alpha(opacity='+iopacity+')'; }; this.easyin = function(){ var me = this,iopacity = 5; var innerfoo = function(){ if(iopacity>=100){if(me.afterin){me.afterin();}return;} iopacity += 5; me.setalpha(iopacity); window.setTimeout(arguments.callee,100); }; innerfoo(); }; this.easyout = function(){ var me = this,iopacity = 100; var innerfoo = function(){ if(iopacity<=20){if(me.afterout){me.afterout();}return;} iopacity -= 5; me.setalpha(iopacity); window.setTimeout(arguments.callee,100); }; innerfoo(); }; this.turnon = function(){this.style.display = 'block';}; this.turnoff = function(){this.style.opacity = 0,this.style.filter = 'alpha(opacity=0)';this.style.display = 'none';}; this.init = function(){ this.turnoff(); var drow = this.rows,lr = drow.length,lc = drow[0].cells.length,stype = this.stype,classEffect = neonEffect[this.effect]; var ismsie = /msie/i.test(navigator.appVersion); var showtimer = this.showtimer,sh = 0,sp1 = ismsie?20:10,sp2 = ismsie?10:5; if(stype=='neon vneon'){ for(var c=0;c<lc;c++){classEffect.call(drow[0].cells[c],sh,sp1,showtimer);sh += 1;} }else{ for(var r=0;r<lr;r++){classEffect.call(drow[r].cells[0],sh,sp2,showtimer);sh += 1;} } }; this.init(); }; var dv = document.getElementById('vneon'); dv.innerHTML = newcanvas(200,1); var dvneon = dv.childNodes[0]; neon.call(dvneon,0,'chromatogram'); dvneon.afterin = function(){window.setTimeout(function(){dvneon.easyout();},5000);}; dvneon.afterout = function(){dvneon.turnoff();dhneon.turnon();dhneon.easyin();}; dvneon.turnon(); dvneon.easyin(); var dh = document.getElementById('hneon'); dh.innerHTML = newcanvas(1,60); var dhneon = dh.childNodes[0]; neon.call(dhneon,1,'chromatogram'); dhneon.afterin = function(){window.setTimeout(function(){dhneon.easyout();},5000);}; dhneon.afterout = function(){dhneon.turnoff();dvneon.turnon();dvneon.easyin();}; </script> </html>參觀 [目前Firefox中好使,其他瀏覽器需複製到本地,存爲html文件看效果]
在當今的互聯網時代,數據的獲取和分析變得日益重要。無論是進行市場研究、用戶行爲分析還是產品開發,獲取大量數據都是不可或缺的一環。然而,很多有價值的信息都隱藏在動態加載的網頁中,這些網頁通過JavaScript動態生成內容,傳統的爬蟲技術
前言 隨着數字音樂的普及,越來越多的用戶選擇在線音樂平臺來享受音樂。網易雲音樂作爲國內領先的音樂服務平臺,不僅提供了豐富的音樂資源,還擁有獨特的社交屬性,吸引了大量的用戶。在衆多的音樂服務中,音頻鏈接的抓取技術成爲了一個重要的需求。無論
DHTMLX Suite UI 組件庫允許您更快地構建跨平臺、跨瀏覽器 Web 和移動應用程序。它包括一組豐富的即用式 HTML5 組件,這些組件可以輕鬆組合到單個應用程序界面中。 DHTMLX Gantt是用於跨瀏覽器和跨平臺應用程序的功
在使用織夢DedeCMS程序的時候是否有看到在打開網站首頁的時候會有index.html這樣子的後綴跟着。有些朋友可能忌諱這樣的樣式,有的會說對網站SEO有影響,實際上影響是不大的,只不過看着確實不是特別好看,如果我們有需要去掉的話也是可以
大數據,函數相關視頻講解: 013爲什麼說未來系統是linux 008_ 輸出h字符_REPL_引號_括號_什麼是函數 數據結構與算法-棧-Go代碼演示版 微積分基本想法 數據科學中的函數 1.如何生成多行的序列 spark sq
摘要 隨着短視頻平臺的興起,如何高效地獲取視頻內容成爲了一個熱門話題。本文將通過構建一個Haskell網絡爬蟲來爬取抖音平臺的視頻列表,深入分析網絡爬蟲的設計和實現過程。我們將探討Haskell在網絡爬蟲開發中的優勢,以及如何利用Has
如今當用戶需要處理PDF文件時,通常不得不下載應用程序或者瀏覽器插件,控制用戶如何與PDF交互並不是一件容易的事。如果我們提供PDF作爲內容,用戶可以下載它並使用瀏覽器或PDF本身提供的控件進行交互。然而,一些企業可能希望控制用戶使用PDF
鴻蒙原生應用再新丁!新華社 入局鴻蒙 來自 #HarmonyOS# 微博5月27日消息 #鴻蒙千帆起#新華社客戶端完成鴻蒙原生應用核心版本開發,將實現不同使用場景下更加智能、精準、及時的要聞推送,以及主流價值的全場景覆蓋和高效傳播!與此同
本文針對B端營銷系統設計中的複雜性,從戰略設計,戰術設計到代碼架構,詳細介紹了DDD在各個階段的實踐,期望爲大家提供一些可供參考和借鑑的思路。 1 背景 通過營銷活動實現客戶/用戶拉新、留存和促活是業界普遍採用的方法。爲實現商戶增長和
1. 前言 正則表達式是一種用來匹配字符串的強有力工具。設計思想是用一種描述性的語言來給字符串定義一個規則,凡是符合規則的字符串我們就認爲它“匹配”了,否則該字符串就是不合法的。 日常開發中常常會使用正則表達式,例如:對數據格式進行校
DevExtreme擁有高性能的HTML5 / JavaScript小部件集合*使您可以利用現代Web開發堆棧*包括React*Angular*ASP.NET Core*jQuery*Knockout等*構建交互式的Web應用程序。從Ang
引言 隨着大數據時代的到來,網頁爬蟲作爲一種高效的數據收集工具,被廣泛應用於互聯網數據抓取和信息抽取。而知乎是一個知識分享平臺,擁有大量的用戶生成內容。通過爬蟲獲取知乎數據,企業和研究人員可以進行深入的數據分析和市場研究,瞭解用戶的需求
JetBrains IDEs日前正式發佈了v2024.1版本,此版本中最大的亮點就是帶來了AI賦能的全行代碼補全,同時在最新的IDEs中重做了終端、擁有更強大的代碼編輯和導航功能、更智能的代碼分析和提示、更優化的性能、更豐富的插件和集成等。
通義靈碼自從入職阿里雲以來備受行業關注。5 月 24 日,阿里雲工程師奔赴北京、成都、杭州三城,向企業和開發者介紹並演示通義靈碼,通義靈碼依然是大家話題的C位,並收穫了衆多粉絲。 @杭州 阿里雲金融創新峯會 今天,2024 阿里雲金融創新峯
DevExtreme擁有高性能的HTML5 / JavaScript小部件集合,使您可以利用現代Web開發堆棧(包括React,Angular,ASP.NET Core,jQuery,Knockout等)構建交互式的Web應用程序。從Ang