【HTML特效程序】① 给女神表白的程序(让女神看科技烟花),输入名字自动生成表白二维码

简介: 【HTML特效程序】① 给女神表白的程序(让女神看科技烟花),输入名字自动生成表白二维码


一、效果演示视频

给女神表白的程序

二、一步一步创建项目

🌹 在您的电脑上创建 love 文件夹 (存放所有的资源和代码)

🌹 在 love 文件夹中创建 images 文件夹 (存放图片资源)

🌹 在 love 文件夹中创建 js 文件夹 (存放 js 代码资源)

🌹 在 love 文件夹中创建 index.html 文件 (存放 js 代码资源)


🌹 在 images 文件夹中放入下面的两张图片【把一张图片命名为a8.png、另一张图片命名为a8b.png


🌹 在 js 文件夹中创建lib文件夹

🌹 在 lib 文件夹中导入下面的两个文件(我认为这就是一个装逼程序,没有必要了解代码😅😀)具体资源看后面的百度网盘


🌹 在 index.html 文件中粘贴下面的代码

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<title>forever love</title>
</head>
<script src="js/lib/jquery.min.js" type="text/javascript"></script>
<script src="js/lib/jquery.fireworks.js" type="text/javascript"></script>
<style type="text/css">
*{ -webkit-tap-highlight-color:rgba(0,0,0,0); -webkit-box-sizing: border-box; box-sizing: border-box; }
html{ width: 100%; height: 100%; }
body{ max-width: 600px; margin: 0 auto; background: #0b3443; color: #f0f0f0;}
.share_img{ width: 0; height: 0; overflow: hidden; opacity: 0; }
.content{ padding: 80px 20px;}
.text_wrapper{ display: -webkit-box; display: flex; }
.text_wrapper .text{ padding-top: 20px; padding-left: 20px; }
.hide{ display: none !important; }
p{ margin: 0; }
.btn-groups{ padding-right: 20px; text-align: center; }
.heart-btn{ display: inline-block; animation: breath 0.8s linear 0s infinite both; -webkit-animation: breath 0.8s linear 0s infinite both; }
.btn{ position: relative; display: inline-block; width: 60px; height: 60px; margin: 0 30px; transform: rotate(45deg); -webkit-transform: rotate(45deg);}
.btn span{ display: block; width: 100%; height: 100%; line-height: 60px; margin-top: -10px; margin-left: -10px; text-align: center; transform: rotate(-45deg); -webkit-transform: rotate(-45deg); }
.btn-a{ background: #d26ae5; }
.btn-b{ background: #c9c9c9; }
.btn-a:before{ content: ''; position: absolute; display: block; width: 30px; height: 60px; background: #d26ae5; left: -29px; top: 0; border-top-left-radius: 60px; border-bottom-left-radius: 60px; }
.btn-a:after{ content: ''; position: absolute; display: block; width: 60px; height: 30px; background: #d26ae5; left: 0; top: -29px; border-top-left-radius: 60px; border-top-right-radius: 60px;}
.btn-b:before{ content: ''; position: absolute; display: block; width: 30px; height: 60px; background: #c9c9c9; left: -29px; top: 0; border-top-left-radius: 60px; border-bottom-left-radius: 60px; }
.btn-b:after{ content: ''; position: absolute; display: block; width: 60px; height: 30px; background: #c9c9c9; left: 0; top: -29px; border-top-left-radius: 60px; border-top-right-radius: 60px;}
.container{  }
.container .mask{ position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.3); }
.container .modal{ width: 80%; height: 160px; position: absolute; top: 50%; left: 50%; padding: 20px 15px; border-radius: 5px; transform: translate(-50%, -70%); -webkit-transform: translate(-50%,-70%); background: #f3f3f3;}
.container .modal p{ margin-top: 20px; margin-bottom: 20px; font-size: 16px; color: #353535; text-align: center;}
.confirm{ display: block; width: 120px; height: 40px; margin: 0 auto; border: none; font-size: 16px; border-radius: 5px; color: #ffffff; background: #f45cae; }
.type_words{ padding: 12px 20px; }
@keyframes breath {
  0% {
    transform: scale3d(1,1,1);
    -webkit-transform: scale3d(1,1,1);
    transform-origin: 50% 50%;
  }
  50%{
    transform: scale3d(1.02,1.02,1.02);
    -webkit-transform: scale3d(1.02,1.02,1.02);
    transform-origin: 50% 50%;
  }
  100%{
    transform: scale3d(1,1,1);
    -webkit-transform: scale3d(1,1,1);
    transform-origin: 50% 50%;
  }
}
</style>
<script type="text/javascript">
$(function() {
  $('#yes').click(function(event) {
    modal('我就知道小姐姐您一定会愿意的。(^_^)', function() {
      $('.page_one').addClass('hide');
      $('.page_two').removeClass('hide');
      // typeWrite();
      fireworks();
      
    });
  });
  $('#no').click(function(event) {
    modal('明人不说暗话我喜欢你!', A);
  });
});
function A() {
  modal('程序员工资挺高的可以养活你!', B);
}
function B() {
  modal('口红包包都给你买', C);
}
function C() {
  modal('请不要拒绝我', D);
}
function D() {
  modal('拒绝我,不存在的', E);
}
function E() {
  modal('这辈子都不可能让你离开我', F);
}
function F() {
  modal('跟我走吧', G);
}
function G() {
  modal('房产证上写你名', H);
}
function H() {
  modal('饭肯定是我做 碗也是我洗', I);
}
function I() {
  modal('指东绝不往西!', J)
}
function J() {
  modal('行,我们去民政局登记吧', function() {
    fireworks();
  });
}
function fireworks() {
  $('.page_one').addClass('hide');
  $('.page_two').removeClass('hide');
  $('.page_two').fireworks({ 
    sound: false, 
    opacity: 0.9, 
    width: '100%', 
    height: '100%' 
  }); 
}
function modal(content, callback) {
  var tpl = '<div class="container">'+
              '<div class="mask"></div>'+
              '<div class="modal">'+
                '<p>'+ content +'</p>'+
                '<button type="button" id="confirm" class="confirm">确定</button>'+
              '</div>'+
            '</div>';
  $('body').append(tpl);
  $(document).on('click', '.confirm', function() {
    $('.container').remove();
    callback();
  });
}
var myWords = '有人说,人的一生会遇到2920万人,而两个人相爱的概率只有0.000049。在这茫茫人海中,两个人能相遇就值得感激,能相爱更是一种难得。所以,我很庆幸上天让我遇见了你。我希望有个如你一般的人,能看完我写过的所有状态,读完我所有的日志,看完我从小到大的照片,试着听我喜欢的歌。如果可以,甚至陪我去我喜欢的地方,只想弥补错过你的青春。';
var x = 0;
var speed = 150;
var current = 0;
function typeWrite(){
  $('.type_words').html(myWords.substring(0, x++)+'_');
  var timer = setTimeout("typeWrite()", speed);
  if (x == myWords.length) {
    x = myWords.length;
    clearTimeout(timer)
  }
}
</script>
<body>
<div class="share_img"><img src="images/a8b.png" alt=""></div>
<div class="page_one">
  <div class="content">
    <div class="text_wrapper">
      <img src="images/a8.png" alt="">
      <div class="text">
        小姐姐,我好喜欢你,你愿意做我女朋友吗?
      </div>
    </div>
  </div>
  <div class="btn-groups">
    <div class="heart-btn">
      <div id="yes" class="btn btn-a"><span>愿意</span></div>
    </div>
    <div id="no" class="btn btn-b"><span>不愿意</span></div>
  </div>
</div>
<div class="page_two hide">
  <div class="type_words"></div>
</div>
</body>
</html>

❤️ 可以修改上面的文字,指定给某个人表白

❤️ 上述完成后,可双击 index.html 执行代码

❤️ 完整内容可通过下面的百度网盘进行下载哦!【给个❤️吧】

链接:https://pan.baidu.com/s/1jl89wxaYDRmdxLj04aUeYw 
提取码:1qrm

❤️ 实话说,这些都是装逼程序,我也看不懂

❤️ 无论如何,可以装逼就可以了

三、生成表白二维码的小链接

🎄 博主自己创建了一个生成表白二维码的网址

🎄 下面教大家如何使用

🎄 ① 点击下面的链接

http://gqok.xyz/admin/LoveYou/1/name.html

🎄 ② 输入名字、点击确定、点击【生成表白二维码的链接】

🎄 ③ 把表白二维码分享给对方

❤️ 愿表白成功哦!

相关文章
|
3月前
|
前端开发 JavaScript API
2024 新年HTML5+Canvas制作3D烟花特效(附源码)
2024 新年HTML5+Canvas制作3D烟花特效(附源码)
54 0
|
11天前
|
数据采集 XML 数据挖掘
使用Python打造爬虫程序之HTML解析大揭秘:轻松提取网页数据
【4月更文挑战第19天】本文介绍了HTML解析在爬虫技术中的重要性,并通过Python的BeautifulSoup库展示了如何解析和提取数据。文章涵盖了HTML文档结构、使用BeautifulSoup的基本方法,如`find_all()`、选择器(标签、类、ID选择器)以及提取文本、属性和链接。此外,还讨论了遍历和处理嵌套元素的技巧。
|
22天前
|
JavaScript C#
C#winForm程序与html JS交互调用
C#winForm程序与html JS交互调用
|
2月前
酷炫的粒子动态表白HTML源码
酷炫的粒子动态表白HTML源码,自己自定义文字,动态组合文字,进行表白,喜欢的朋友可以下载使用,很不错的表白HTML代码
22 0
酷炫的粒子动态表白HTML源码
|
3月前
|
前端开发
【HTML】过年不能放烟花,那就放电子烟花
闲谈 大家回家过年可能都多多少少放过些🧨,但是有些在城市上过年的小伙伴可能就没有机会放鞭炮了。不过没关系,我们懂技术,我们用技术自娱自乐,放电子烟花,总不可能被警长叔叔敲门问候吧。
23 0
|
3月前
|
前端开发 JavaScript
基于HTML实现浪漫情人节表白代码(附源代码)
基于HTML实现浪漫情人节表白代码(附源代码)
139 0
|
4月前
|
前端开发 安全 JavaScript
html+css+js实现的新年烟花
html+css+js实现的新年烟花
31 0
|
4月前
|
前端开发 JavaScript 容器
html+css+js写抽奖程序
html+css+js写抽奖程序
44 0
|
9月前
|
Web App开发 前端开发 JavaScript
让 HTML 网页打印自己的源代码 - HTML的 Quine 程序实现
Quine 程序是指一个能够输出自身代码的计算机程序。在这篇文章中,我们将用HTML代码来实现一个Quine程序。我们把这个任务分成两步,首先让`<head>`标签中的内容显示出来,然后显示元素的标签
106 0
让 HTML 网页打印自己的源代码 - HTML的 Quine 程序实现
|
5月前
|
存储 JavaScript 前端开发
使用 HTML、CSS、JS 和 API 制作一个很棒的天气 Web 应用程序
使用 HTML、CSS、JS 和 API 制作一个很棒的天气 Web 应用程序
71 0