?許多" />

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

15158846557 在線咨詢 在線咨詢
15158846557 在線咨詢
所在位置: 首頁(yè) > 營(yíng)銷資訊 > 網(wǎng)站運(yùn)營(yíng) > HTML+CSS+JavaScript實(shí)現(xiàn)滿屏愛心特效 520情人節(jié)表白源碼HTML

HTML+CSS+JavaScript實(shí)現(xiàn)滿屏愛心特效 520情人節(jié)表白源碼HTML

時(shí)間:2023-09-18 11:00:01 | 來源:網(wǎng)站運(yùn)營(yíng)

時(shí)間:2023-09-18 11:00:01 來源:網(wǎng)站運(yùn)營(yíng)

HTML+CSS+JavaScript實(shí)現(xiàn)滿屏愛心特效 520情人節(jié)表白源碼HTML:

? 七夕情人節(jié) ?html+css+j?實(shí)現(xiàn)滿屏愛心特效(程序員表白)

?程序員表白, 很多人和小編一樣受到暴擊,需要告白的同學(xué)加緊了,不要錯(cuò)過這個(gè)好時(shí)機(jī)。

?許多程序員小伙伴總是苦于找不到合適的告白方式。在這里,特地整理了一些程序員專屬的告白方式與大家分享,一起看看程序員用代碼敲出的浪漫吧~

?首先咱作為程序員逼格自然要高,可不是簡(jiǎn)單我愛你,送個(gè)花,擺個(gè)心形蠟燭那樣簡(jiǎn)單了。

? PC 電腦端







? html

<!-- * @Author: your name * @Date: 2021-01-14 15:04:13 * @LastEditTime: 2021-01-14 15:05:48 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: /情人節(jié)滿屏愛心HTML5特效/index.html--><!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" /> <title>情人節(jié)滿屏愛心HTML5特效</title> <link rel="stylesheet" href="css/style.css" /> </head> <body> <div id="main"></div> <div id="contents"> <canvas id="canvas">This browser cannot use a canvas.</canvas> </div> <script src="js/script.js"></script> <div style=" text-align: center; margin: 50px 0; font: normal 14px/24px 'MicroSoft YaHei'; " ></div> </body></html>

? css

html, body { height: 100%; width: 100%; padding: 0; margin: 0; overflow:hidden; background: #74ebd5; /* fallback for old browsers */ background: -webkit-linear-gradient(to bottom, #ACB6E5, #74ebd5); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(to bottom, #ACB6E5, #74ebd5); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */}/******************** Contents********************/canvas#canvas { background: #74ebd5; /* fallback for old browsers */ background: -webkit-linear-gradient(to bottom, #ACB6E5, #74ebd5); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(to bottom, #ACB6E5, #74ebd5); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */}

? js

(function () { 'use strict'; window.addEventListener('load', function() { var canvas = document.getElementById('canvas'); if (!canvas || !canvas.getContext) { return false; } function drawGround() { ctx.beginPath(); ctx.fillStyle = 'rgb(255, 255, 255)'; ctx.rect(0, Y - Y * 0.1, X, Y - Y * -0.1); ctx.fill(); } // var var snowNum = 80; var backSnowNum = 80; var snows = []; var backSnows = []; if (X < 768) { snowNum = 25; backSnowNum = 25; } function Snow(ctx, x, y, r, g) { this.ctx = ctx; this.init(x, y, r, g); } Snow.prototype.init = function(x, y, r, g) { this.x = x; this.y = y; this.r = r; this.c = '255, 255, 255'; this.v = { x: 0, y: g }; }; Snow.prototype.updatePosition = function() { this.y += this.v.y; }; Snow.prototype.render = function() { this.updatePosition(); this.wrapPosition(); this.draw(); }; for (var i = 0; i < backSnowNum; i++) { var snow = new Snow(ctx, rand(0, X), rand(0, Y), rand(1, 5), Math.random()); backSnows.push(snow); } for (var i = 0; i < snowNum; i++) { var snow = new Snow(ctx, rand(0, X), rand(0, Y), rand(10, 15), Math.random() + 0.3); snows.push(snow); } /******************** Tree ********************/ // var var treeNum = 30; var trees = []; var backTreeNum = 16; var backTrees = []; var branchRad = 30 * Math.PI / 180; if (X < 768) { treeNum = 15; backTreeNum = 8; } function Tree(ctx, x, y, t, w, c) { this.ctx = ctx; this.init(x, y, t, w, c); } Tree.prototype.init = function(x, y, t, w, c) { this.ctx = ctx; this.x = x; this.y = y; this.t = t; this.w = w; this.c = c this.splitNum = rand(10, 30); this.tSplit = this.t / this.splitNum; this.bSplit = this.w / this.splitNum; }; Tree.prototype.draw = function() { ctx = this.ctx; ctx.lineCap = 'round'; ctx.lineWidth = 3; ctx.strokeStyle = this.c; ctx.beginPath(); ctx.moveTo(this.x, this.y); ctx.lineTo(this.x, this.y - this.t); ctx.stroke(); ctx.lineWidth = 1; } }; render(); /******************** Event ********************/ // resize function onResize() { X = canvas.width = window.innerWidth; Y = canvas.height = window.innerHeight; drawMoon(); drawGround(); } });

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

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

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

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

1.1部署流程







1.2 哇~ 部署成功

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








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

適合入門到高級(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è)模板 、等! 「在這里有好多 前端 開發(fā)者,一起探討 前端 Node 知識(shí),互相學(xué)習(xí)」!

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








八、?更多表白源碼

?100款表白源碼演示地址

關(guān)鍵詞:表白,實(shí)現(xiàn)

74
73
25
news

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

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