【恋爱交友情侣表白网站模板】HTML+CSS+JS制作一个爱心表白网站

❤ 精彩专栏推荐👇🏻👇🏻👇🏻
💂 作者主页: 【进入主页—🚀获取更多源码】
🎓 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文件包含:页面炫酷效果实现


三、🔗网站效果

▶️1.视频演示

55-原生JS制作爱心表白代码

🧩 2.图片演示

在这里插入图片描述


四、💒 网站代码

🧱HTML结构代码


<!--
 * @Author: your name
 * @Date: 2021-04-09 15:21:37
 * @LastEditTime: 2021-04-09 15:23:26
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \原生JS制作爱心表白代码\index.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>心心-样例图</title>

<link href="favicon.ico" rel="shortcut icon" class="icon-love" type="images/x-ico">

<link rel="stylesheet" href="css/love.css">

</head>
<body>

<div class="container" onselectstart="return false;" unselectable="on" style="-moz-user-select:none;">

    <div class="body_left">
        <img src="images/biubiubiu.gif" alt="" ondragstart='return false;'>
    </div>

    <div class="body_center love">
        <div class="block">
            <div class="div1"></div>
            <div class="div2"></div>
            <div class="div3"></div>
            <div class="div4"></div>
        </div>
    </div>

</div>

<div class="footer">
    <div class="border">
        <div class="border-top"></div>
        <div class="border-bottom"></div>
    </div>

</div>

<script type="text/javascript" src="js/love.js"></script>

</body>
</html>



🏠CSS样式代码



* {
    margin: 0;
    padding: 0;
    border: 0;
}
.icon-love {
    width: 400px;
}
html, body {
    width: 100%;
    height: 100%;
}

body {
    /*background-color: skyblue;*/
    overflow: hidden;   /*隐藏超出的部分*/
}

.container {
    width: 100%;
    height: 100%;
    position: relative;
}

/*---------------------- body_left -------------------------*/
.body_left {
    width: 300px;
    height: 300px;
    left: 0;
    bottom: 110px;
    position: absolute;
    z-index: 98;

}

/*---------------------- body_left -------------------------*/

/*---------------------- body_center -------------------------*/
.container .love {
    width: 520px; /* 13 * 40 */
    height: 440px; /* 11 * 40 */
    left: 50%;
    top: 50%;
    position: absolute;
    margin: -260px 0 0 -220px;
    /*background-color: gray;*/
}

.love .block {
    right: 0;
    position: absolute;
    visibility: hidden; /*未开始升空动画前隐藏*/
    background-color: yellow;
}

.love .block div {
    width: 40px;
    height: 40px;
    position: absolute;
    background: url("../images/heart.png") no-repeat;
    background-size: contain;
    /*background-color: #c40908;*/
    /*border: 1px solid silver;*/
    box-sizing: border-box;
}


/*---------------------- body_center -------------------------*/

/*---------------------- footer -------------------------*/
@keyframes border {
    0% {
        width: 0;
    }
    5% {
        width: 5%;
    }
    10% {
        width: 10%;
    }
    15% {
        width: 15%;
    }
    20% {
        width: 20%;
    }
    25% {
        width: 25%;
    }
    30% {
        width: 30%;
    }
    35% {
        width: 35%;
    }
    40% {
        width: 40%;
    }
    45% {
        width: 45%;
    }
    50% {
        width: 50%;
    }
    55% {
        width: 55%;
    }
    60% {
        width: 60%;
    }
    65% {
        width: 65%;
    }
    70% {
        width: 70%;
    }
    75% {
        width: 75%;
    }
    80% {
        width: 80%;
    }
    85% {
        width: 85%;
    }
    90% {
        width: 90%;
    }
    95% {
        width: 95%;
    }
    100% {
        width: 100%;
    }

}
.footer {
    bottom: 30px;
    position: relative;
    z-index: 99;
}
.footer .border .border-top {
    /*width: 0;*/
    /*display: inline-block;*/
    border-top: 3px solid black;
    transform-origin: left center;
    -webkit-animation: border 312 linear;
    -o-animation: border 12s linear;
    animation: border 12s linear;
    animation-fill-mode : both;
    /*border-bottom: none;*/
}

.footer .border .border-bottom {
    /*width: 0;*/
    /*display: inline-block;*/
    float: right;
    border-top: 3px solid red;
    transform-origin: right center;
    -webkit-animation: border 7s linear 12s;
    -o-animation: border 7s linear 12s;
    animation: border 7s linear 12s;
    animation-fill-mode : both;
    /*border-bottom: none;*/
}

.footer .copyright {
    width: 100%;
    height: 30px;
    position: absolute;
    bottom: -30px;
    text-align: center;
    /*background-color: gray;*/

}

.copyright div {
    width: 30%;
    line-height: 30px;
    display: inline-block;
}

.copyright div span {
    color: dimgray;
}

/*---------------------- footer -------------------------*/






五、🎁更多源码

1.如果我的博客对你有帮助 请 “👍点赞” “✍️评论” “💙收藏” 一键三连哦!

2.💗【👇🏻👇🏻👇🏻🉑关注我| 获取更多源码】 带您学习各种前端插件、3D炫酷效果、图片展示、文字效果、以及整站模板 、大学生毕业HTML模板 、等!

📣以上内容技术相关问题💌欢迎一起交流学习👇🏻👇🏻👇🏻

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

STU学生网页设计

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值