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

15158846557 在線咨詢 在線咨詢
15158846557 在線咨詢
所在位置: 首頁 > 營銷資訊 > 網(wǎng)站運營 > 520七夕情人節(jié)表白代碼~html+css+javascript實現(xiàn)櫻花愛心相冊「可以拿去送給自己喜

520七夕情人節(jié)表白代碼~html+css+javascript實現(xiàn)櫻花愛心相冊「可以拿去送給自己喜

時間:2023-07-24 05:51:02 | 來源:網(wǎng)站運營

時間:2023-07-24 05:51:02 來源:網(wǎng)站運營

520七夕情人節(jié)表白代碼~html+css+javascript實現(xiàn)櫻花愛心相冊「可以拿去送給自己喜歡的人」:

? 520七夕情人節(jié)那天我用代碼給女朋友送了一個禮物~html+css+javascript實現(xiàn)櫻花愛心相冊「可以拿去送給自己喜歡的人」

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

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


@TOC





? 前言

對于程序員來說,“單身”依然是人生最大的 bug,關鍵是還無法調試。雖然俗話說“自古英雄多寂寞”,但是缺少另一半的人生總是不完整的。況且,距離一年一度的情(虐)人(狗)節(jié)不遠了。


1. PC(電腦端)演示

?在線演示地址




2. H5(手機端)演示







? 代碼文件目錄







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

html (3D相冊部分)

<html> <head> <title></title> </head> <style> * { padding: 0; margin: 0; } html, body { height: 100%; padding: 0; margin: 0; background: #000; } canvas { position: absolute; width: 100%; height: 100%; } .aa { position: fixed; left: 50%; bottom: 10px; color: #ccc; } </style> <body> <canvas id="pinkboard"></canvas> </body>

js (櫻花愛心部分)

<script> /* * Settings */ var settings = { particles: { length: 500, // maximum amount of particles duration: 2, // particle duration in sec velocity: 100, // particle velocity in pixels/sec effect: -0.75, // play with this for a nice effect size: 30, // particle size in pixels }, }; /* * RequestAnimationFrame polyfill by Erik M?ller */ (function () { var b = 0; var c = ["ms", "moz", "webkit", "o"]; for (var a = 0; a < c.length && !window.requestAnimationFrame; ++a) { window.requestAnimationFrame = window[c[a] + "RequestAnimationFrame"]; window.cancelAnimationFrame = window[c[a] + "CancelAnimationFrame"] || window[c[a] + "CancelRequestAnimationFrame"]; } if (!window.requestAnimationFrame) { window.requestAnimationFrame = function (h, e) { var d = new Date().getTime(); var f = Math.max(0, 16 - (d - b)); var g = window.setTimeout(function () { h(d + f); }, f); b = d + f; return g; }; } if (!window.cancelAnimationFrame) { window.cancelAnimationFrame = function (d) { clearTimeout(d); }; } })(); var Point = (function () { function Point(x, y) { this.x = typeof x !== "undefined" ? x : 0; this.y = typeof y !== "undefined" ? y : 0; } Point.prototype.clone = function () { return new Point(this.x, this.y); }; Point.prototype.length = function (length) { if (typeof length == "undefined") return Math.sqrt(this.x * this.x + this.y * this.y); this.normalize(); this.x *= length; this.y *= length; return this; }; var Particle = (function () { function Particle() { this.position = new Point(); this.velocity = new Point(); this.acceleration = new Point(); this.age = 0; } Particle.prototype.initialize = function (x, y, dx, dy) { this.position.x = x; this.position.y = y; this.velocity.x = dx; this.velocity.y = dy; this.acceleration.x = dx * settings.particles.effect; this.acceleration.y = dy * settings.particles.effect; this.age = 0; }; Particle.prototype.update = function (deltaTime) { this.position.x += this.velocity.x * deltaTime; this.position.y += this.velocity.y * deltaTime; this.velocity.x += this.acceleration.x * deltaTime; this.velocity.y += this.acceleration.y * deltaTime; this.age += deltaTime; };

css (3D相冊部分)

.box { width: 200px; height: 200px; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-size: 100% 100%; position: absolute; margin-left: 42%; margin-top: 22%; -webkit-transform-style: preserve-3d; -webkit-transform: rotateX(13deg); -webkit-animation: move 5s linear infinite;}.minbox li:nth-child(1) { background: url(../img/01.png) no-repeat 0 0; -webkit-transform: translateZ(50px);}.minbox li:nth-child(2) { background: url(../img/02.png) no-repeat 0 0; -webkit-transform: rotateX(180deg) translateZ(50px);}.minbox li:nth-child(3) { background: url(../img/03.png) no-repeat 0 0; -webkit-transform: rotateX(-90deg) translateZ(50px);}.minbox li:nth-child(4) { background: url(../img/04.png) no-repeat 0 0; -webkit-transform: rotateX(90deg) translateZ(50px);}.minbox li:nth-child(5) { background: url(../img/05.png) no-repeat 0 0; -webkit-transform: rotateY(-90deg) translateZ(50px);}.minbox li:nth-child(6) { background: url(../img/06.png) no-repeat 0 0; -webkit-transform: rotateY(90deg) translateZ(50px);}.maxbox li:nth-child(1) { background: url(../img/1.png) no-repeat 0 0; -webkit-transform: translateZ(50px);}.maxbox li:nth-child(2) { background: url(../img/2.png) no-repeat 0 0; -webkit-transform: translateZ(50px);}.maxbox li:nth-child(3) { background: url(../img/3.png) no-repeat 0 0; -webkit-transform: rotateX(-90deg) translateZ(50px);}.maxbox li:nth-child(4) { background: url(../img/4.png) no-repeat 0 0; -webkit-transform: rotateX(90deg) translateZ(50px);}.maxbox li:nth-child(5) { background: url(../img/5.png) no-repeat 0 0; -webkit-transform: rotateY(-90deg) translateZ(50px);}.maxbox li:nth-child(6) { background: url(../img/6.png) no-repeat 0 0; -webkit-transform: rotateY(90deg) translateZ(50px);}.maxbox { width: 800px; height: 400px; position: absolute; left: 0; top: -20px; -webkit-transform-style: preserve-3d;}.maxbox li { width: 200px; height: 200px; background: #fff; border: 1px solid #ccc; position: absolute; left: 0; top: 0; opacity: 0.2; -webkit-transition: all 1s ease;}.maxbox li:nth-child(1) { -webkit-transform: translateZ(100px);}.maxbox li:nth-child(2) { -webkit-transform: rotateX(180deg) translateZ(100px);}.maxbox li:nth-child(3) { -webkit-transform: rotateX(-90deg) translateZ(100px);}.maxbox li:nth-child(4) { -webkit-transform: rotateX(90deg) translateZ(100px);}.maxbox li:nth-child(5) { -webkit-transform: rotateY(-90deg) translateZ(100px);}.maxbox li:nth-child(6) { -webkit-transform: rotateY(90deg) translateZ(100px);}

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

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

1.相片裁剪(教程)

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




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

1選擇需要裁減的圖片







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

3..保存相片




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

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







2.下載




3獲取歌曲id




4關注公眾號以后/復制鏈接到瀏覽器打開







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





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

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

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

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

1.1部署流程







1.2 哇~ 部署成功

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





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

適合入門到高級的童鞋們入手~





六、? 源碼獲取

? ~ 關注我,點贊博文~ 每天帶你漲知識!

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

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

? 3.以上內容技術相關問題可以相互學習,可關注↓公Z號 獲取更多源碼 !








七、?更多表白源碼

?100款表白源碼演示地址

關鍵詞:相冊,櫻花,表白,七夕,實現(xiàn)

74
73
25
news

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

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