❤ 精彩专栏推荐👇🏻👇🏻👇🏻
💂 作者主页: 【进入主页—🚀获取更多源码】
🎓 web前端期末大作业: 【📚HTML5网页期末作业 (1000套) 】
🧡 程序员有趣的告白方式:【💌HTML七夕情人节表白网页制作 (125套) 】
七夕来袭!是时候展现专属于程序员的浪漫了!你打算怎么给心爱的人表达爱意?鲜花礼物?代码表白?还是创意DIY?或者…无论那种形式,快来秀我们一脸吧!
📒网站文件方面:html网页结构文件、css网页样式文件、js网页特效文件、images网页图片文件;
📙网页编辑方面:可使用任意HTML编辑软件(如:Dreamweaver、HBuilder、Vscode 、Sublime 、Webstorm、Text 、Notepad++
等任意html编辑软件进行运行及修改编辑等操作)。
其中:
(1)📜html文件包含:其中index.html是首页、其他html为二级页面;
(2)📑 css文件包含:css全部页面样式,3D动态效果,雪花飘落等等
(3)📄 js文件包含:页面炫酷效果实现
51-烟花表白(询问文字开场+自定义文字)
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" href="css/style.css" />
<script
id="jqbb"
src="https://libs.baidu.com/jquery/1.11.1/jquery.min.js"
>script>
<style>
html,
body {
margin: 0;
padding: 0;
overflow: hidden;
background-color: black;
user-select: none;
margin: 0;
}
.city {
width: 100%;
position: fixed;
bottom: 0px;
z-index: 100;
}
.city img {
width: 100%;
}
audio {
opacity: 0;
}
style>
<title>炫酷烟花表白title>
<link href="modal.css" rel="stylesheet" />
head>
<body onselectstart="return false">
<div class="star comet">div>
<script src="js/index.js">script>
<div class="share_img"><img src="img/xin.png" alt="" />div>
<div class="page_one">
<div class="content">
<div class="text_wrapper">
<img class="xin" src="img/xin.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>
<canvas id="cas" style="background-color: rgba(0, 5, 24, 1); z-index: 9999">
浏览器不支持canvas
canvas>
<div class="city">
<img src="img/city.png" alt="" />
div>
<img src="img/moon.png" alt="" id="moon" style="visibility: hidden" />
<div style="display: none">
<div class="shape">520❤div>
<div class="shape">茫茫人海div>
<div class="shape">相遇是缘div>
<div class="shape">我爱你直到永远div>
div>
<audio autoplay loop id="music">
<source src="mp3/music.mp3" />
audio>
<iframe
id="iframMusic"
allow="autoplay"
style="display: none"
src="mp3/blank.mp3"
>iframe>
<script src="jquery.min.js">script>
<script src="fire.js">script>
<script src="talk.js">script>
body>
html>
* {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.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: pink;
}
.btn-b {
background: #c9c9c9;
}
.btn-a:before {
content: "";
position: absolute;
display: block;
width: 30px;
height: 60px;
background: pink;
left: -29px;
border-top-left-radius: 60px;
border-bottom-left-radius: 60px;
}
.btn-a:after {
content: "";
position: absolute;
display: block;
width: 60px;
height: 30px;
background: pink;
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: 50%;
height: 160px;
position: absolute;
top: 55%;
left: 50%;
padding: 20px 15px;
border-radius: 5px;
/* transform: translate(-50%, -70%); */
-webkit-transform: translate(-50%, -0%);
-webkit-transform: translate(-50%, -0%);
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%;
}
}
.page_one {
position: absolute;
z-index: 10;
top: 50%;
left: 50%;
transform: translate(-50%, -90%);
}
.text {
color: pink;
font-size: 16px;
}
.xin {
width: 20%;
}
1.如果我的博客对你有帮助 请 “👍点赞” “✍️评论” “💙收藏”
一键三连哦!
2.💗【👇🏻👇🏻👇🏻🉑关注我| 获取更多源码】
带您学习各种前端插件、3D炫酷效果、图片展示、文字效果、以及整站模板 、大学生毕业HTML模板 、等!
📣以上内容技术相关问题💌欢迎一起交流学习👇🏻👇🏻👇🏻