国产成人精品无码青草_亚洲国产美女精品久久久久∴_欧美人与鲁交大毛片免费_国产果冻豆传媒麻婆精东

15158846557 在線咨詢 在線咨詢
15158846557 在線咨詢
所在位置: 首頁 > 營銷資訊 > 網(wǎng)站運(yùn)營 > 520情人節(jié)表白網(wǎng)頁代碼~html+css+js浪漫星空?愛心3D相冊 (含音樂)

520情人節(jié)表白網(wǎng)頁代碼~html+css+js浪漫星空?愛心3D相冊 (含音樂)

時(shí)間:2023-07-26 13:12:02 | 來源:網(wǎng)站運(yùn)營

時(shí)間:2023-07-26 13:12:02 來源:網(wǎng)站運(yùn)營

520情人節(jié)表白網(wǎng)頁代碼~html+css+js浪漫星空?愛心3D相冊 (含音樂):

? 來自程序員的浪漫告白~html+css+js浪漫星空?愛心3D相冊 (含音樂)可自定義編輯文字

一年一度的/520情人節(jié)/七夕情人節(jié)/生日禮物/告白師妹/圣誕節(jié)/元旦節(jié)跨年/程序員表白,是不是要給女朋友或者正在追求的妹子一點(diǎn)小驚喜呢,今天這篇博客就分享下前端代碼html+css+javascript 如何實(shí)現(xiàn)3D立體動態(tài)相冊。趕緊學(xué)會了,來制作屬于我們程序員的浪漫吧!

告白前, 我們的留言區(qū)開放給你!快來秀出你的別樣表白方式,和你心儀的那個ta表白吧!

? 前言

程序員 520/七夕情人節(jié)/1314/表白/求婚,是不是要給女朋友或者正在追求的妹子一點(diǎn)小驚喜呢 ? html+css+js 編寫的浪漫星空?愛心相冊表白效果,酷炫迷人,助力程序員撩妹手到擒來,一帆風(fēng)順,祝愿大家有情人終成眷屬,天長地久。。趕緊學(xué)會了,來制作屬于我們程序員的浪漫吧!

1. PC(電腦端)演示

在線演示地址




2. H5(手機(jī)端)演示







? 代碼文件目錄







一、3D相冊(代碼實(shí)現(xiàn))

html (相冊部分)

<body> <audio autoplay="autopaly"> <source src="renxi.mp3" type="audio/mp3" /> </audio> <!-- 星空html --> <!-- <div> --> <div class="container2"> <div class="content"> <canvas id="universe"></canvas> </div> </div> <!-- </div> --> <div class="title"> <!-- 星團(tuán)文字html --> <h3 class="STARDUST1">&nbsp;&nbsp;2016 - 2021</h3> <h1 class="STARDUST2">小夕-相遇是緣</h1> <h3 class="STARDUST3">L O V E <strong>?</strong> Y O U</h3> <!-- 愛心html --> <img class="img" src="./123.png" alt="" /> <canvas id="pinkboard"> </canvas> </div> </body>

js (星空部分)

<!-- 星團(tuán)js --> <script> let particles = []; let microparticles = []; const c1 = createCanvas({ width: $(window).width(), height: $(window).height(), }); const tela = c1.canvas; const canvas = c1.context; // $("body").append(tela); $("body").append(c1.canvas); setTimeout( function () { clearInterval(this.ID); }.bind(this), this.life ); } render() { this.canvas.beginPath(); this.canvas.arc(this.x, this.y, this.radius, 0, 2 * Math.PI); // this.canvas.lineWidth = 2; this.canvas.shadowOffsetX = 0; this.canvas.shadowOffsetY = 0; // this.canvas.shadowBlur = 6; this.canvas.shadowColor = "#000000"; this.canvas.fillStyle = this.color; this.canvas.fill(); this.canvas.closePath(); } move() { this.x -= this.direction * Math.sin(this.progress / (this.random1 * 430)) * this.s; this.y -= Math.cos(this.progress / this.h) * this.s; if (this.x < 0 || this.x > this.w - this.radius) { clearInterval(this.ID); return false; } if (this.y < 0) { clearInterval(this.ID); return false; } this.render(); this.progress++; return true; } } setInterval( function () { particles.push(new Particle1(canvas)); random_life = 2000 * Math.random(); }.bind(this), random_life ); function clear() { let grd = canvas.createRadialGradient( tela.width / 2, tela.height / 2, 0, tela.width / 2, tela.height / 2, tela.width ); grd.addColorStop(0, "rgba(20,20,20,1)"); grd.addColorStop(1, "rgba(0,0,0,0)"); // Fill with gradient canvas.globalAlpha = 0.16; canvas.fillStyle = grd; canvas.fillRect(0, 0, tela.width, tela.height); } function update() { clear(); particles = particles.filter(function (p) { return p.move(); }); microparticles = microparticles.filter(function (mp) { return mp.move(); }); requestAnimationFrame(update.bind(this)); } function createCanvas(properties) { let canvas = document.createElement("canvas"); canvas.width = properties.width; // canvas.style.zIndex = 999; canvas.height = properties.height; let context = canvas.getContext("2d"); return { canvas: canvas, context: context, }; } update(); </script>

二、3D相冊裁剪(教程)

教程如下:需要1張圖片(可自定義)

1.相片裁剪(教程)

首先:下載美圖秀秀/百度下載/或者軟件安裝 或者使用在線鏈接裁剪---> 在線裁剪圖片鏈接




2.美圖秀秀(電腦版)裁剪圖片

1選擇需要裁減的圖片







2.圖片裁減大小建議在 600px *600px 左右 否則圖片太大,頁面會出現(xiàn)卡頓現(xiàn)象哦

3..保存相片




三、歌曲mp3更換教程(教程)

如需更換mp3背景音樂,可自行下載更換即可~ mp3免費(fèi)下載地址 1.搜索需要的歌曲







2.下載




3獲取歌曲id




4關(guān)注公眾號以后/復(fù)制鏈接到瀏覽器打開







5下載mp3 ~下載完畢以后自行替換mp3文件即可(如不想修改代碼,必須保持名稱一致)





四、做好的網(wǎng)頁效果,如何通過發(fā)鏈接給別人看?

1.1 解決部署上線~> 部署上線工具(可永久免費(fèi)使用)

1.不需要買服務(wù)器就能部署線上,全世界都能訪問你的連接啦, 這里給大家推薦一個程序員必備神器~ 插件集成了超級多好用的插件,免費(fèi)下載安裝,簡單易懂, 簡直神器 ~ 需要可在文章 ↓ 下方公Z號獲取

2.就是把你的代碼效果做好了以后, 部署到線上, 把鏈接發(fā)給別人, 就可以讓對方通過你的連接點(diǎn)擊進(jìn)去, 就能看到你的網(wǎng)頁效果啦, 電腦端和手機(jī)端都可以噢! (不然別人看你的網(wǎng)頁都要發(fā)文件過去,體驗(yàn)感不太好哦~)

1.1部署流程







1.2 哇~ 部署成功

哇~ 部署成功! 將你寫好的頁面部署上線后, 全世界的人都可以通過鏈接訪問到你的網(wǎng)頁了(永久免費(fèi)使用哦)~





五、前端 零基礎(chǔ) 入門到高級 (視頻+源碼+開發(fā)軟件+學(xué)習(xí)資料+面試題) 一整套 (教程)

適合入門到高級的童鞋們?nèi)胧謣





六、? 源碼獲取

? ~ 關(guān)注我,點(diǎn)贊博文~ 每天帶你漲知識!

? 1.看到這里了就 [點(diǎn)贊+好評+收藏] 三連~ 支持下吧,你的「點(diǎn)贊,好評,收藏」是我創(chuàng)作的動力。

? 2.關(guān)注我~ 每天帶你學(xué)習(xí) :各種前端插件、3D炫酷效果、圖片展示、文字效果、以及整站模板 、大學(xué)生畢業(yè)模板 、期末大作業(yè)模板 、等! 「在這里有好多 前端 開發(fā)者,一起探討 前端 Node 知識,互相學(xué)習(xí)」!

? 3.以上內(nèi)容技術(shù)相關(guān)問題可以相互學(xué)習(xí),可關(guān)注↓公Z號 獲取更多源碼 !








七、?更多表白源碼

?100款表白源碼演示地址

關(guān)鍵詞:星空,浪漫,音樂,相冊,表白

74
73
25
news

版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。

為了最佳展示效果,本站不支持IE9及以下版本的瀏覽器,建議您使用谷歌Chrome瀏覽器。 點(diǎn)擊下載Chrome瀏覽器
關(guān)閉