HTML5七夕情人节表白网页制作【原生JS制作爱心表白代码】HTML CSS JavaScript

13,806次阅读
没有评论

共计 2866 个字符,预计需要花费 8 分钟才能阅读完成。

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

【作者主页——🔥获取更多优质源码】

【学习资料 / 简历模板 / 面试资料 / 网站设计与制作】

【web 前端期末大作业——🔥🔥毕设项目精品实战案例】


文章目录

  • 一、网页介绍
  • 一、网页效果
  • 二、代码展示
  • 三、精彩专栏

一、网页介绍

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

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


一、网页效果

HTML5 七夕情人节表白网页制作【原生 JS 制作爱心表白代码】HTML CSS JavaScript

HTML5 七夕情人节表白网页制作【原生 JS 制作爱心表白代码】HTML CSS JavaScript

二、代码展示

1.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>




2.CSS 代码



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

body {
    
    overflow: hidden;   
}

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


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

}




.container .love {
    width: 520px; 
    height: 440px; 
    left: 50%;
    top: 50%;
    position: absolute;
    margin: -260px 0 0 -220px;
    
}

.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;
    
    
    box-sizing: border-box;
}





@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 {
    
    
    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;
    
}

.footer .border .border-bottom {
    
    
    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;
    
}

.footer .copyright {
    width: 100%;
    height: 30px;
    position: absolute;
    bottom: -30px;
    text-align: center;
    

}

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

.copyright div span {
    color: dimgray;
}





三、精彩专栏

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

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

原文地址: HTML5 七夕情人节表白网页制作【原生 JS 制作爱心表白代码】HTML CSS JavaScript

    正文完
     0
    Yojack
    版权声明:本篇文章由 Yojack 于2024-10-07发表,共计2866字。
    转载说明:
    1 本网站名称:优杰开发笔记
    2 本站永久网址:https://yojack.cn
    3 本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长进行删除处理。
    4 本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
    5 本站所有内容均可转载及分享, 但请注明出处
    6 我们始终尊重原创作者的版权,所有文章在发布时,均尽可能注明出处与作者。
    7 站长邮箱:laylwenl@gmail.com
    评论(没有评论)