这是程序员表白系列中的100款网站表白之一,旨在让任何人都能使用并创建自己的表白网站给心爱的人看。 此波共有100个表白网站,可以任意修改和使用,很多人会希望向心爱的男孩女孩告白,生性腼腆的人即使那个TA站在眼前都不敢向前表白。说不出口的话就用短视频告诉TA吧~制作一个表白网页告诉TA你的心意,演示如下。

文章目录

  • 一、网页介绍
  • 一、网页效果
  • 二、代码展示
    • 1.HTML代码
    • 2.CSS代码
  • 三、精彩专栏

一、网页介绍

1 网页简介:基于 HTML+CSS+JavaScript 制作七夕情人节表白网页、生日祝福、七夕告白、 求婚、浪漫爱情3D相册、炫酷代码 ,快来制作一款高端的表白网页送(他/她)浪漫的告白,制作修改简单,可自行更换背景音乐,文字和图片即可使用

2.网页编辑:任意HTML编辑软件(如:Dreamweaver、HBuilder、Vscode 、Sublime 、Webstorm、Text 、Notepad++ 等任意html编辑软件进行运行及修改编辑等操作)。


一、网页效果


二、代码展示

1.HTML代码

代码如下(示例):以下仅展示部分代码供参考~

<!DOCTYPE html>
<html><head><meta charset="utf-8" /><title>七夕情人节- 动漫3D相册告白</title><!-- 播放器css --><link rel="stylesheet" href="./css/common.css" /><!-- 相册css --><link type="text/css" href="./css/style.css" rel="stylesheet" /><scriptid="jqbb"src="https://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script><style type="text/css">body {margin: 0;position: relative;}.raining {display: block;}/* 背景图片 */.backimg {position: absolute;left: 0;top: 0;background: url(img/20.jpg);height: 100%;width: 100%;opacity: 0.3;}.audio {position: absolute;left: 0;top: 0;}</style>
</head><body><!-- 烟花 --><canvas class="raining"></canvas><!-- 打字 --><div class="typing"><!-- 字幕 --><h2 class="header-sub-title" id="word"></h2><h2 class="header-sub-title blink">|</h2></div><!-- 相册 --><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 id="app"><div class="container_player"><div class="music-box"><!-- 播放器相片 --><img src="img/01.png" /><div class="mask"><div class="mplayer" onclick="play()"><i class="fa"><span class="before"></span><span class="after"> </span></i><svgclass="loadingSvg"width="25"height="25"viewBox="0,0,50,50"style="position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"><circle></circle></svg></div><div class="m-circle m-progress"><svg width="163" height="163" viewBox="0,0,163,163"><circlecx="81"cy="81"r="159"stroke-width="8"stroke="rgba(255, 206, 113, 0.2)"fill="rgba(0,0,0,.2)"></circle><circleclass="a"cx="81"cy="81"r="159"stroke-width="6"stroke="rgba(255, 206, 113, 1)"fill="none"stroke-dasharray="0 999"transform="matrix(0,-1,1,0,0,163)"></circle></svg></div><div class="m_time"><span class="mplayer_curtime">00:00</span><span class="m-join">/</span><span class="mplayer_durtime">00:00</span></div></div></div></div></div><!-- 音乐 --><audio id="myAudio" src="./azn.mp3" loop="loop" ></audio><div class="backimg"></div>
</body>
<script type="text/javascript" src="js/christmassnow.js"></script>
<script src="js/common.js"></script>
<script type="text/javascript">
$(document).ready(function(){/* 自动播放音乐 */play()
})
/* 烟花 */var canvas = document.querySelector(".raining");var w, h;~~ function setSize() { //定义canvas的宽高,让他跟浏览器的窗口的宽高相同window.onresize = arguments.callee;w = window.innerWidth;h = window.innerHeight;canvas.width = w;canvas.height = h;}();var canCon = canvas.getContext("2d"); //建立2d画板var arain = []; //新建数组,储存雨滴//function random(min, max) { //返回最小值到最大值之间的值return Math.random() * (max - min) + min;}function rain() {};rain.prototype = {init: function() { //变量初始化this.x = random(0, w); //在0-w之间生成雨滴this.vx = 0.1;this.y = h; //起点在下面this.vy = random(4, 5);this.h = random(0.1 * h, 0.4 * h); //地板高度this.r = 1; //雨滴绽放的半径this.vr = 1;this.colos = Math.floor(Math.random() * 1000);},draw: function() {if (this.y > this.h) {canCon.beginPath(); //拿起一支笔canCon.fillStyle = '#' + this.colos; //笔墨的颜色,随机变化的颜色canCon.fillRect(this.x, this.y, 3, 10); //想象画一个雨滴} else {canCon.beginPath(); //拿起一支笔canCon.strokeStyle = '#' + this.colos; //笔墨的颜色canCon.arc(this.x, this.y, this.r, 0, Math.PI * 2); //想象画一个圆canCon.stroke(); //下笔作画}},move: function() { //重点是判断和初始位置。其他无大变化if (this.y > this.h) { //位置判断this.y += -this.vy; //从下往上                } else {if (this.r < 100) { //绽放的大小this.r += this.vr;} else {this.init(); //放完后回归变量原点}}this.draw(); //开始作画}}function createrain(num) {for (var i = 0; i < num; i++) {setTimeout(function() {var raing = new rain(); //创建一滴雨raing.init();raing.draw();arain.push(raing);}, 800 * i) //每隔150ms下落一滴雨}}createrain(10); //雨滴数量setInterval(function() {canCon.fillStyle = "rgba(0,0,0,0.1)"; //拿起一支透明0.13的笔        canCon.fillRect(0, 0, w, h); //添加蒙版 控制雨滴长度for (var item of arain) {//item of arain指的是数组里的每一个元素//item in arain指的是数组里的每一个元素的下标(包括圆形连上的可遍历元素)item.move(); //运行整个move事件}}, 1000 / 60); //上升时间// -----------打印字-----------const words = ["❤亲爱的,今天是我们在一起的第520天","❉ 月梅星稀鸣蝉哀,胡琴曲幽谁人拉","❉ 今夜无人盈袖拂,时逢科举缘是由","❉ 你的笑,我无法忘掉","❉ 你的好,温暖我心潮","❉ 你的美,如秋月皎皎","❉ 我的爱,如秋水淼淼","❉ 陪着你一直到老","❉ 亲爱的,七夕到了","❉ 陪着你度过生命中的每一个七夕",];let i = 0;let timer;// speed in mslet deleteDelay = 3000;let typeSpeed = 100;let delSpeed = 50;/* 开始编写文字 */function typingEffect() {let word = words[i].split("");var loopTyping = function () {if (word.length > 0) {document.getElementById("word").innerHTML += word.shift();} else {delay(function () {deletingEffect(); // do stuff}, deleteDelay); // end delay// deletingEffect();return false;}timer = setTimeout(loopTyping, typeSpeed);};loopTyping();}function deletingEffect() {let word = words[i].split("");var loopDeleting = function () {if (word.length > 0) {word.pop();document.getElementById("word").innerHTML = word.join("");} else {if (words.length > i + 1) {i++;}else {i = 0;}typingEffect();return false;}timer = setTimeout(loopDeleting, delSpeed);};loopDeleting();}var delay = (function () {var timer = 0;return function (callback, ms) {clearTimeout(timer);timer = setTimeout(callback, ms);};})();/* 开始打印字 */typingEffect();</script></html>

2.CSS代码


@charset "utf-8";
* {margin: 0;padding: 0;
}
body {max-width: 100%;min-width: 100%;height: 100%;background-size: cover;background-repeat: no-repeat;background-attachment: fixed;background-size: 100% 100%;position: absolute;margin-left: auto;margin-right: auto;
}
li {list-style: none;
}.box {z-index: 999999 !important;width: 200px;height: 200px;background-size: cover;background-repeat: no-repeat;background-attachment: fixed;background-size: 100% 100%;position: fixed !important;top: 42%;left: 40%;-webkit-transform-style: preserve-3d;-webkit-transform: rotateX(13deg);-webkit-animation: move 5s linear infinite;
}
.minbox {width: 100px;height: 100px;position: absolute;left: 50px;top: 30px;-webkit-transform-style: preserve-3d;
}
.minbox li {width: 100px;height: 100px;position: absolute;left: 0;top: 0;
}
.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);
}
.box:hover ol li:nth-child(1) {-webkit-transform: translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(2) {-webkit-transform: rotateX(180deg) translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(3) {-webkit-transform: rotateX(-90deg) translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(4) {-webkit-transform: rotateX(90deg) translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(5) {-webkit-transform: rotateY(-90deg) translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
.box:hover ol li:nth-child(6) {-webkit-transform: rotateY(90deg) translateZ(300px);width: 400px;height: 400px;opacity: 0.8;left: -100px;top: -100px;
}
@keyframes move {0% {-webkit-transform: rotateX(13deg) rotateY(0deg);}100% {-webkit-transform: rotateX(13deg) rotateY(360deg);}
}
/* 雪花css */
.snowLayer {position: absolute;left: -400px;top: -400px;height: 2000px !important;overflow: hidden;
}
.blink {animation: blink 0.5s infinite;animation-delay: 500ms;
}@keyframes blink {to {opacity: 0;}
}.typing {display: flex;top: 10%;left: 4%;z-index: 999999 !important;position: fixed !important;
}.header-sub-title,
h2 {font-weight: 600;font-size: 40px;color: skyblue;padding-right: 0.1em;text-transform: uppercase;
}

三、精彩专栏

看到这里了就 【点赞,关注,收藏】 三连 支持下吧,你的支持是我创作的动力。

情人节程序员用HTML网页表白【情人相册模板】 HTML5七夕情人节表白网页源码 HTML+CSS+JavaScript相关推荐

  1. 100款 ❤HTML5七夕情人节表白网页源码❤ HTML+CSS+JavaScript 【建议收藏】

    120款❤HTML5七夕情人节表白网页源码❤ HTML+CSS+JavaScript 这是程序员表白系列中的100款网站表白之一,旨在让任何人都能使用并创建自己的表白网站给心爱的人看. 此波共有100 ...

  2. HTML期末大作业~海贼王中乔巴专题漫画学生网页设置作业源码(HTML+CSS+JavaScript)...

    HTML期末大作业~海贼王中乔巴专题漫画学生网页设置作业源码(HTML+CSS+JavaScript) 这次网页主要是介绍在近年来非常受关注的日本超人气漫画 海贼王 作者是尾田荣一郎 主页分为 漫画简 ...

  3. HTML期末大作业~海贼王中乔巴专题漫画学生网页设置作业源码(HTML+CSS+JavaScript)

    HTML期末大作业~海贼王中乔巴专题漫画学生网页设置作业源码(HTML+CSS+JavaScript) 这次网页主要是介绍在近年来非常受关注的日本超人气漫画 海贼王 作者是尾田荣一郎 主页分为 漫画简 ...

  4. HTML5期末大作业:电商购物网站设计——易购电商购物网页设计与实现(31页) 含论文+答辩+PPT 计算机毕设网页设计源码 HTML+CSS+JavaScript web课程设计网页规划与设计...

    HTML5期末大作业:电商网站设计--易购电商购物网页设计与实现(31页) 含论文+PPT 学生DW网页设计作业成品 HTML+CSS+JavaScript web课程设计网页规划与设计 计算机毕设网 ...

  5. 情人节程序员用HTML网页表白【在一起计时】 HTML5七夕情人节表白网页源码 HTML+CSS+JavaScript

    这是程序员表白系列中的100款网站表白之一,旨在让任何人都能使用并创建自己的表白网站给心爱的人看. 此波共有100个表白网站,可以任意修改和使用,很多人会希望向心爱的男孩女孩告白,生性腼腆的人即使那个 ...

  6. 情人节程序员用HTML网页表白【嫦娥奔月(满屏泡泡)】 HTML5七夕情人节表白网页源码 HTML+CSS+JavaScript

    这是程序员表白系列中的100款网站表白之一,旨在让任何人都能使用并创建自己的表白网站给心爱的人看. 此波共有100个表白网站,可以任意修改和使用,很多人会希望向心爱的男孩女孩告白,生性腼腆的人即使那个 ...

  7. 情人节程序员用HTML网页表白【超具创意的网页生日快乐】 HTML5七夕情人节表白网页源码 HTML+CSS+JavaScript

    这是程序员表白系列中的100款网站表白之一,旨在让任何人都能使用并创建自己的表白网站给心爱的人看. 此波共有100个表白网站,可以任意修改和使用,很多人会希望向心爱的男孩女孩告白,生性腼腆的人即使那个 ...

  8. 情人节程序员用HTML网页表白【制作属于我们的爱情相册网页】 HTML5七夕情人节表白网页源码 HTML+CSS+JavaScript

    这是程序员表白系列中的100款网站表白之一,旨在让任何人都能使用并创建自己的表白网站给心爱的人看. 此波共有100个表白网站,可以任意修改和使用,很多人会希望向心爱的男孩女孩告白,生性腼腆的人即使那个 ...

  9. 情人节程序员用HTML网页表白【爱心_文字音乐告白】 HTML5七夕情人节表白网页源码 HTML+CSS+JavaScript

    这是程序员表白系列中的100款网站表白之一,旨在让任何人都能使用并创建自己的表白网站给心爱的人看. 此波共有100个表白网站,可以任意修改和使用,很多人会希望向心爱的男孩女孩告白,生性腼腆的人即使那个 ...

最新文章

  1. mysql中实现over partiton by,进行分组排序取topN
  2. 【教程】nrf51822实例代码解析及修改实例
  3. junit5和junit4_JUnit 5 –架构
  4. mysql改了排序规则不生效_Mysql数据库表排序规则不一致导致联表查询,索引不起作用问题...
  5. 微信小程序入门三:轮播图
  6. 【HDU5299】Circles Game,圆的扫描线+树上删边游戏
  7. 句子分类_Bert做新闻标题文本分类
  8. Hive命名空间-自定义变量
  9. php判断值和类型,php如何判断某变量的类型?
  10. 线搜索中有最速下降法、牛顿法、拟牛顿法、共轭梯度法汇总
  11. mybatis与data jpa
  12. (二十三)Java工具类ToStringBuilder方法详解
  13. php 字符串长度的解释
  14. ns3安装 + eclipse
  15. PHP读取txt文件自动分成指定行数
  16. 人工智能 倒啤酒问题 python解法
  17. 关于cosine_similarity参数的问题
  18. SQL server卸载软件(可修复注册表)
  19. FPGA niosII 视频笔记--小梅
  20. 提笔,再回忆~落笔,成悔,一切皆已随风:伤感日志

热门文章

  1. 黑马程序员_音乐(视频)播放器学习
  2. memory_max_target/memory_target设置过大报ORA-00845错误
  3. uni-app 什么是datacom?
  4. 已有一个已排好序的数组,要求输入一个数,将它插入数组中,保持数组依然有序。
  5. 2022 大一大二基础hive考试题
  6. PPT——————酷炫文字、人物海报
  7. 中断向量表 异常相量表 中断向量(中断函数入口地址)ARM和X86异常向量表不同
  8. 微信小程序数据拼接_最佳方式实现微信小程序分页加载数据
  9. 关于 Dota Rdsp 计算器的编写(一)
  10. 淘宝一键下架在售商品步骤