所需软件

下载vscode 如图

步骤

1.打开vscode,新建文件并命名

2.输入代码

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE> ❤ </TITLE><META NAME="Generator" CONTENT="EditPlus"><META NAME="Author" CONTENT=""><META NAME="Keywords" CONTENT=""><META NAME="Description" CONTENT=""><style>html,body {height: 100%;padding: 0;margin: 0;background: rgb(1, 10, 13);//此处可换背景颜色}canvas {position: absolute;width: 100%;height: 100%;}</style></HEAD><BODY><canvas id="pinkboard"></canvas><script>var settings = {particles: {length: 500, // maximum amount of particlesduration: 2, // particle duration in secvelocity: 100, // particle velocity in pixels/seceffect: -0.75, // play with this for a nice effectsize: 30, // particle size in pixels},};(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;};Point.prototype.normalize = function() {var length = this.length();this.x /= length;this.y /= length;return this;};return Point;})();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;};Particle.prototype.draw = function(context, image) {function ease(t) {return (--t) * t * t + 1;}var size = image.width * ease(this.age / settings.particles.duration);context.globalAlpha = 1 - this.age / settings.particles.duration;context.drawImage(image, this.position.x - size / 2, this.position.y - size / 2, size, size);};return Particle;})();var ParticlePool = (function() {var particles,firstActive = 0,firstFree = 0,duration = settings.particles.duration;function ParticlePool(length) {// create and populate particle poolparticles = new Array(length);for (var i = 0; i < particles.length; i++)particles[i] = new Particle();}ParticlePool.prototype.add = function(x, y, dx, dy) {particles[firstFree].initialize(x, y, dx, dy);// handle circular queuefirstFree++;if (firstFree == particles.length) firstFree = 0;if (firstActive == firstFree) firstActive++;if (firstActive == particles.length) firstActive = 0;};ParticlePool.prototype.update = function(deltaTime) {var i;if (firstActive < firstFree) {for (i = firstActive; i < firstFree; i++)particles[i].update(deltaTime);}if (firstFree < firstActive) {for (i = firstActive; i < particles.length; i++)particles[i].update(deltaTime);for (i = 0; i < firstFree; i++)particles[i].update(deltaTime);}// remove inactive particleswhile (particles[firstActive].age >= duration && firstActive != firstFree) {firstActive++;if (firstActive == particles.length) firstActive = 0;}};ParticlePool.prototype.draw = function(context, image) {if (firstActive < firstFree) {for (i = firstActive; i < firstFree; i++)particles[i].draw(context, image);}if (firstFree < firstActive) {for (i = firstActive; i < particles.length; i++)particles[i].draw(context, image);for (i = 0; i < firstFree; i++)particles[i].draw(context, image);}};return ParticlePool;})();(function(canvas) {var context = canvas.getContext('2d'),particles = new ParticlePool(settings.particles.length),particleRate = settings.particles.length / settings.particles.duration, // particles/sectime;function pointOnHeart(t) {return new Point(160 * Math.pow(Math.sin(t), 3),130 * Math.cos(t) - 50 * Math.cos(2 * t) - 20 * Math.cos(3 * t) - 10 * Math.cos(4 * t) + 25);}var image = (function() {var canvas = document.createElement('canvas'),context = canvas.getContext('2d');canvas.width = settings.particles.size;canvas.height = settings.particles.size;function to(t) {var point = pointOnHeart(t);point.x = settings.particles.size / 2 + point.x * settings.particles.size / 350;point.y = settings.particles.size / 2 - point.y * settings.particles.size / 350;return point;}context.beginPath();var t = -Math.PI;var point = to(t);context.moveTo(point.x, point.y);while (t < Math.PI) {t += 0.01;point = to(t);context.lineTo(point.x, point.y);}context.closePath();context.fillStyle = '#ea80b0';context.fill();var image = new Image();image.src = canvas.toDataURL();return image;})();// render that thing!function render() {// next animation framerequestAnimationFrame(render);var newTime = new Date().getTime() / 1000,deltaTime = newTime - (time || newTime);time = newTime;context.clearRect(0, 0, canvas.width, canvas.height);var amount = particleRate * deltaTime;for (var i = 0; i < amount; i++) {var pos = pointOnHeart(Math.PI - 2 * Math.PI * Math.random());var dir = pos.clone().length(settings.particles.velocity);particles.add(canvas.width / 2 + pos.x, canvas.height / 2 - pos.y, dir.x, -dir.y);}particles.update(deltaTime);particles.draw(context, image);}function onResize() {canvas.width = canvas.clientWidth;canvas.height = canvas.clientHeight;}window.onresize = onResize;setTimeout(function() {onResize();render();}, 10);})(document.getElementById('pinkboard'));</script></BODY>
</HTML>

3.点击文件栏另存为
注意保存类型一定为HTML
可以存在桌面比较好找

4.在桌面找到对应网页图标 进入
5.完成!

点燃我,温暖你(打火机与公主裙)真零基础爱心教程!相关推荐

  1. 214 情人节来袭,电视剧 《点燃我温暖你》李峋同款 Python爱心表白代码,赶紧拿去用吧

    大家好,我是徐公,六年大厂程序员经验,今天为大家带来的是动态心形代码,电视剧 <点燃我温暖你>同款的,大家赶紧看看,拿去向你心仪的对象表白吧,下面说一下灵感来源. 灵感来源 今天,早上起来 ...

  2. python web开发项目 源码_真零基础Python开发web

    Python开发web服务的优势是开发效率高,可能只需要java五分之一的代码量. Python搭建web服务有许多框架,本文介绍Django和bottle两个框架. Django 安装 首先,安装该 ...

  3. 0基础web开发 python_真零基础Python开发web

    Python开发web服务的优势是开发效率高,可能只需要java五分之一的代码量. Python搭建web服务有许多框架,本文介绍Django和bottle两个框架. Django 安装 首先,安装该 ...

  4. python人工智能入门零基础_【贾老坏】真·零基础入门人工智能+Python+数学

    [贾老坏]是一个系列公开课,从 Python 最基础的语法讲起,专为"从没接触过编程的小白"打造! 循序渐进,最短时间搞定数学.编程.算法等人工智能研发需要的所有基础! 搭载最新. ...

  5. python与h5开发_【Python】真零基础Python开发web

    Python开发web服务的优势是开发效率高,可能只需要java五分之一的代码量. Python搭建web服务有许多框架,本文介绍Django和bottle两个框架. Django 安装 首先,安装该 ...

  6. 免费直播!真.零基础能学会的前端入门教程,还带实操抖音风格字体特效!

    茫茫职海中,有没有那么一个又简单又赚钱的行业呢? 答案:前端!!! 前端是进入技术行业的一个捷径,规划好能事半功倍. 1.前端门槛低,简单易学: 2.应用场景广泛,现已涉及到了各个领域: 3.市场需求 ...

  7. CTF----Web真零基础入门

    目录 前置知识导图: ​TCP/IP体系结构(IP和端口): IP是什么:是计算机在互联网上的唯一标识(坐标,代号),用于在互联网中寻找计算机. 内网(局域网)IP和公网(互联网)IP: 内网IP:路 ...

  8. 《点燃我温暖你》中李峋的同款爱心代码

    前言 最近<点燃我温暖你>中李峋的爱心代码超级火,看着特别心动,这不,光棍节快到了,给兄弟们教学一波爱心代码,赶在双十一前表白,让这个双十一不在是孤单一个人! 目录 前言 Python简易 ...

  9. 《点燃我温暖你》---爱心代码

    一.前言 电视剧<点燃我温暖你>中理工男李峋做的爱心代码非常好看,今天搬运来一个完整代码,快给你的那个她露一手吧~ 二.代码实现 以下就是完整版的代码哦 <!DOCTYPE HTML ...

最新文章

  1. svm rbf人脸识别 yale_实操课——机器学习之人脸识别
  2. Codeforces Round #Pi (Div. 2)(A,B,C,D)
  3. spark Bisecting k-means(二分K均值算法)
  4. char转成string_真没想到,一个小小的String居然还有这么多窍门?
  5. 备忘录——通过RVA计算文件位置
  6. Android系统init进程启动及init.rc全解析
  7. iptables 命令记录
  8. Android 4.0 NDK Updated
  9. c语言数组的一维编程,C语言编程一维数组的使用.doc
  10. openoffice php com,nginx+php+openOffice
  11. Spring boot 2.1版本、2.3及以上版本使用actuator实现优雅关闭程序
  12. 【codeforce 219D】 Choosing Capital for Treeland (树形DP)
  13. 拓端tecdat|r语言ggplot2误差棒图快速指南
  14. zeal刷新不出来_Zeal——好用的离线 API 文档大全!
  15. 算法:Longest Valid Parentheses(最长有效的括号)
  16. ISO27001标准
  17. 西门子plc选型该看哪些参数
  18. 【光纤通信】实验二、C语言实现HDB3编码
  19. Chrome插件开发教程
  20. ppspp android编译,PPSSPP Windows和Android更新版本至1.1~~

热门文章

  1. matlab绘制图形hold on_Matlab中的命令hold on hold off
  2. pass by value 与pass by reference 小结
  3. 排序?吹泡泡吹到排序
  4. 一对一视频交友源码打造独特的一对一聊天系统
  5. ABAP SY-系统值
  6. 微信小程序获取地理位置,用户未开启手机定位时的解决方案
  7. python的mapl画图y轴排_Python三维绘图之Matplotlib库的使用方法
  8. 运营商做互联网产品的十种死法
  9. 一阶零输入响应例题_一阶电路的零输入响应的特征方程
  10. (Java)模拟肯德基点餐系统