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

所在位置: 首頁(yè) > 營(yíng)銷(xiāo)資訊 > 網(wǎng)站運(yùn)營(yíng) > HTML5七夕情人節(jié)表白代碼 (動(dòng)態(tài)3D相冊(cè))HTML+CSS+JS

HTML5七夕情人節(jié)表白代碼 (動(dòng)態(tài)3D相冊(cè))HTML+CSS+JS

時(shí)間:2023-07-20 07:06:01 | 來(lái)源:網(wǎng)站運(yùn)營(yíng)

時(shí)間:2023-07-20 07:06:01 來(lái)源:網(wǎng)站運(yùn)營(yíng)

HTML5七夕情人節(jié)表白代碼 (動(dòng)態(tài)3D相冊(cè))HTML+CSS+JS:

? 超炫html+css+javascript幻化3D相冊(cè) (含背景音樂(lè))程序員表白必備 _520_七夕情人節(jié)

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

? 前言

HTML+css+js 抖音很火的3d旋轉(zhuǎn)相冊(cè)-包含音樂(lè),(送女友,表白,生日)動(dòng)態(tài)生成效果,這樣制作的~,現(xiàn)在,越來(lái)越多的人喜歡用視頻記錄生活,照片多的友友也會(huì)選擇制作動(dòng)態(tài)相冊(cè)視頻,不僅創(chuàng)意十足,同時(shí)還能展現(xiàn)自我風(fēng)采, 撩妹神器哦!

? 3D相冊(cè)演示(含背景音樂(lè))可自定義12張相片

在線(xiàn)演示地址

1. PC(電腦端)演示







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



















? 代碼文件目錄







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

html (3D相冊(cè)部分)

<body> <!--音樂(lè)部分 --> <audio autoplay="autopaly"> <source src="renxi.mp3" type="audio/mp3" /> </audio> <div id="jsi-cherry-container" class="container"> <!-- 3D相冊(cè)代碼部分 --> <div class="box"> <ul class="minbox"> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> <ol class="maxbox"> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ol> </div> </div> </body>

js (部分)

<script> var RENDERER = { INIT_CHERRY_BLOSSOM_COUNT: 30, MAX_ADDING_INTERVAL: 10, init: function() { this.setParameters(); this.reconstructMethods(); this.createCherries(); this.render(); setParameters: function() { this.$container = $('#jsi-cherry-container'); this.width = this.$container.width(); this.height = this.$container.height(); this.context = $('<canvas />') .attr({ width: this.width, height: this.height }) .appendTo(this.$container) .get(0) .getContext('2d'); this.cherries = []; this.maxAddingInterval = Math.round( (this.MAX_ADDING_INTERVAL * 1000) / this.width ); this.addingInterval = this.maxAddingInterval; }, reconstructMethods: function() { this.render = this.render.bind(this); }, var CHERRY_BLOSSOM = function(renderer, isRandom) { this.renderer = renderer; this.init(isRandom); }; CHERRY_BLOSSOM.prototype = { FOCUS_POSITION: 300, FAR_LIMIT: 600, MAX_RIPPLE_COUNT: 100, RIPPLE_RADIUS: 100, SURFACE_RATE: 0.5, SINK_OFFSET: 20, init: function(isRandom) { this.x = this.getRandomValue( -this.renderer.width, this.renderer.width ); var axis = this.getAxis(), theta = this.theta + (Math.ceil( -(this.y + this.renderer.height * this.SURFACE_RATE) / this.vy ) * Math.PI) / 500; theta %= Math.PI * 2; this.offsetY = 40 * (theta <= Math.PI / 2 || theta >= (Math.PI * 3) / 2 ? -1 : 1); this.thresholdY = this.renderer.height / 2 + this.renderer.height * this.SURFACE_RATE * axis.rate; this.entityColor.addColorStop( 0, 'hsl(330, 70%, ' + 50 * (0.3 + axis.rate) + '%)' ); this.entityColor.addColorStop( 0.05, 'hsl(330, 40%,' + 55 * (0.3 + axis.rate) + '%)' ); this.entityColor.addColorStop( 1, 'hsl(330, 20%, ' + 70 * (0.3 + axis.rate) + '%)' ); $(function() { RENDERER.init(); }); </script>

css (3D相冊(cè)部分)

.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相冊(cè)裁剪(教程)

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

1-6 圖片是大圖 400px*400px ,01-06 圖片是小圖 100px*100px

將準(zhǔn)備好的圖片,自行替換 img 文件中的圖片即可!







1.相片裁剪(教程)

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




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

2.1選擇圖片裁剪




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

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







2.下載




3獲取歌曲id




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







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





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

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

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

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

1.1部署流程







1.2 哇~ 部署成功

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





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

適合入門(mén)到高級(jí)的童鞋們?nèi)胧謣





六、? 源碼獲取

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

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

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

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








七、?更多表白源碼

?100款表白源碼演示地址

關(guān)鍵詞:動(dòng)態(tài),相冊(cè),表白,七夕

74
73
25
news

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

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