HTML5浪漫生日祝福电子贺卡网页模板(HTML5+CSS3+JS)_520表白/七夕情人节表白/告白网页制作/生日快乐html模板
html+css+js實現生日快樂代碼🎂超炫酷效果🎂(含生日背景音樂)?520/表白/七夕情人節/求婚?專用炫酷動畫網頁的源代碼
程序員愛情?520/表白/七夕情人節/求婚?專用html5+css3+js 生日快樂網站模板
HTML生日快樂祝福網頁模板,該模板有多種動態效果圖,全局采用藍色裝飾,適用于給女朋友的生日祝福,只需簡單修改,即可用網頁生成打開。html+css+js實現生日快樂代碼🎂超炫酷效果🎂(含生日背景音樂)?520/表白/七夕情人節/求婚?專用炫酷動畫網頁的源代碼
戳下方鏈接↓查看線上演示地址
1.生日快樂🎂(多頁面html模板)★在線演示地址:https://ruanjiafeng2013.gitee.io/happy-birthday-template
2.生日蛋糕🎂★在線演示地址:https://ruanjiafeng2013.gitee.io/birthday-cake
3.(生日快樂)蛋糕煙花+藍色夢幻海洋3D相冊🎂★在線演示地址: https://ruanjiafeng2013.gitee.io/birthday-cake520/
動態效果演示
HTML5慶祝生日蛋糕煙花特效
html代碼
<!DOCTYPE html> <html lang="en"><head><meta charset="UTF-8"><title>制作一個程序員的生日快樂代碼</title><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="css/style.css"><link rel="stylesheet" href="css/style11.css"><link rel="stylesheet" href="css/yanhua.css"><link rel="stylesheet" href="css/style2D.css"> </head><body><marquee style="position: fixed; top: 10px; color: #fff" scrollamount="10">Happy birthday! 生日快樂!</marquee><marquee style="position: fixed; top: 20px; color: #ffd800" scrollamount="3">祝你生日快樂,天天開心!</marquee><marquee style="position: fixed; top: 50px; color: #00ff90" scrollamount="5">祝你生日快樂,沒有煩惱!</marquee><marquee style="position: fixed; top: 50px; color: #00ff90" scrollamount="5">祝你生日快樂,沒有煩惱!</marquee><marquee style="position: fixed; top: 50px; color: #00ff90" scrollamount="5">祝你生日快樂,沒有煩惱!</marquee><marquee style="position: fixed; top: 50px; color: #00ff90" scrollamount="5">祝你生日快樂,沒有煩惱!</marquee><marquee style="position: fixed; top: 50px; color: #00ff90" scrollamount="5">祝你生日快樂,沒有煩惱!</marquee><marquee style="position: fixed; top: 50px; color: #00ff90" scrollamount="5">祝你生日快樂,沒有煩惱!</marquee><main style="text-align:center;position:absolute;"><ul class="star" style="--v: 1; --t: 1;"><li style="--i: 0"></li></ul><ul style="--v: 2; --t: 8; --direction:reverse"><li style="--i: 0"></li><li style="--i: 1"></li><li style="--i: 2"></li><li style="--i: 3"></li><li style="--i: 4"></li><li style="--i: 5"></li><li style="--i: 6"></li><li style="--i: 7"></li></ul><ul style="--v: 3; --t: 12"><li style="--i: 0"></li><li style="--i: 1"></li><li style="--i: 2"></li><li style="--i: 3"></li><li style="--i: 4"></li><li style="--i: 5"></li><li style="--i: 6"></li><li style="--i: 7"></li><li style="--i: 8"></li><li style="--i: 9"></li><li style="--i: 10"></li><li style="--i: 11"></li></ul><ul style="--v: 4; --t: 18; --direction:reverse"><li style="--i: 0"></li><li style="--i: 1"></li><li style="--i: 2"></li><li style="--i: 3"></li><li style="--i: 4"></li><li style="--i: 5"></li><li style="--i: 6"></li><li style="--i: 7"></li><li style="--i: 8"></li><li style="--i: 9"></li><li style="--i: 10"></li><li style="--i: 11"></li><li style="--i: 12"></li><li style="--i: 13"></li><li style="--i: 14"></li><li style="--i: 15"></li><li style="--i: 16"></li><li style="--i: 17"></li></ul></ul><p id="message" style="position:relative;margin-top:-40px;z-index:99999"><img src="img/birthday.png" alt="Alternate Text" /><br /></p></main> <div class="block-audio" style="z-index:10000;"></div><canvas id="canvas"></canvas><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/index1.js"></script><script src="js/script.js"></script></body></html>js代碼
console.clear();/* Play with these values! */ const PARTICLE_COUNT = 100; const SAFE_DISTANCE = 130; const INFECTED_DISTANCE = 15; const INFECTION_RATE = 0.25; const RECOVERY_TIME = 14000; const STAY_AT_HOME = 0.1;/* ---------------------------------- */let particles = [];const STATUSES = {HEALTHY: "HEALTHY",INFECTED: "INFECTED",RECOVERED: "RECOVERED" };const elBody = document.body; const elCanvas = document.querySelector("#canvas"); const ctx = elCanvas.getContext("2d");let width, height;function resize() {width = elCanvas.width = elBody.clientWidth;height = elCanvas.height = elBody.clientHeight; } resize(); window.addEventListener("resize", resize);/* ---------------------------------- */class Particle {constructor() {this.x = Math.random() * width;this.y = Math.random() * height;this.radius = 3;this.color = "white";this.speed = Math.random() < STAY_AT_HOME ? 0 : 1;this.directionAngle = Math.floor(Math.random() * 360);this.vector = {x: Math.cos(this.directionAngle) * this.speed,y: Math.sin(this.directionAngle) * this.speed};this.status = STATUSES.HEALTHY;if (Math.random() < INFECTION_RATE) {this.infect();}}infect() {if (this.status === STATUSES.INFECTED ||this.status === STATUSES.RECOVERED) {return;}this.color = "green";this.status = STATUSES.INFECTED;setTimeout(() => {this.recover();}, RECOVERY_TIME);}recover() {this.status = STATUSES.RECOVERED;this.color = "hotpink";}draw(drawCtx) {drawCtx.beginPath();drawCtx.arc(this.x, this.y, this.radius, 0, Math.PI * 2);drawCtx.closePath();drawCtx.fillStyle = this.color;drawCtx.fill();}update() {this.checkBoundaries();this.x += this.vector.x;this.y += this.vector.y;}checkBoundaries() {if (this.x > width || this.x < 0) {this.vector.x *= -1;/* Ensure the dots are pushed inside */this.x = Math.max(0, Math.min(width, this.x));}if (this.y > height || this.y < 0) {this.vector.y *= -1;/* Ensure the dots are pushed inside */this.y = Math.max(0, Math.min(height, this.y));}} }/* ---------------------------------- */function distance(x1, y1, x2, y2) {var dx = x1 - x2;var dy = y1 - y2;return Math.sqrt(dx * dx + dy * dy); }function linkParticles(particle, otherParticles, drawCtx) {for (const p of otherParticles) {const d = distance(particle.x, particle.y, p.x, p.y);if (d > SAFE_DISTANCE) {continue;}// Infect other particle!if (particle.status === STATUSES.INFECTED && d < INFECTED_DISTANCE) {p.infect();}const opacity = 0.8 - (d / SAFE_DISTANCE) * 0.8;drawCtx.lineWidth = 1;drawCtx.strokeStyle = particle.color; //rgba(255,255,255,${opacity})`;drawCtx.globalAlpha = opacity;drawCtx.beginPath();drawCtx.moveTo(particle.x, particle.y);drawCtx.lineTo(p.x, p.y);drawCtx.closePath();drawCtx.stroke();drawCtx.globalAlpha = 1;} }做好的網頁效果,如何通過發鏈接給別人看?
1.1解決部署上線~> 部署上線工具(永久免費使用)
1.不需要買服務器就能部署線上,全世界都能訪問你的連接啦, 這里給大家推薦一個程序員必備神器~
插件集成了超級多好用的插件,免費下載安裝,簡單易懂, 簡直神器 ~ 需要可在文章 ↓ 下方公Z號獲取
2.就是把你的代碼效果做好了以后, 部署到線上, 把鏈接發給別人, 就可以讓對方通過你的連接點擊進去, 就能看到你的網頁效果啦, 電腦端和手機端都可以噢! (不然別人看你的網頁都要發文件過去,體驗感不太好哦~)
1.1部署流程
1.2 哇~ 部署成功
哇~ 部署成功! 將你寫好的頁面部署上線后, 全世界的人都可以通過鏈接訪問到你的網頁了(永久免費使用哦)~
前端 零基礎 入門到高級 (視頻+源碼+開發軟件+學習資料+面試題) 一整套 (教程)
適合入門到高級的童鞋們入手~
? 源碼獲取
? ~ 關注我,點贊博文~ 每天帶你漲知識!
? 1.看到這里了就 [點贊+好評+收藏] 三連 支持下吧,你的「點贊,好評,收藏」是我創作的動力。
? 2.關注我~ 每天帶你學習 :各種前端插件、3D炫酷效果、圖片展示、文字效果、以及整站模板 、大學生畢業模板 、期末大作業模板 、等! 「在這里有好多 前端 開發者,一起探討 前端 Node 知識,互相學習」!
? 3.以上內容技術相關問題可以相互學習,可關注↓公Z號 獲取更多源碼 !
?更多表白源碼
?100款表白源碼演示地址
總結
以上是生活随笔為你收集整理的HTML5浪漫生日祝福电子贺卡网页模板(HTML5+CSS3+JS)_520表白/七夕情人节表白/告白网页制作/生日快乐html模板的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CSS之flex需要知道的一切(一)
- 下一篇: 11 个 Linux 上最佳的图形化 G