• HTML5七夕情人节表白网页制作【新年倒计时白色雪花飘落】HTML+CSS+JavaScript CSS特效


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

    一、网页介绍

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

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


    一、网页效果

    在这里插入图片描述

    二、代码展示

    1.HTML代码

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

    <html>
      <head>
        <meta charset="utf-8" />
        <script
          id="jqbb"
          src="https://libs.baidu.com/jquery/1.11.1/jquery.min.js"
        >script>
    
        <style type="text/css">
          @import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css");
          @import url("https://fonts.googleapis.com/css?family=Muli&display=swap");
          * {
            box-sizing: border-box;
          }
    
          body {
            background-color: #323975;
            color: #fff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            font-family: "Muli", sans-serif;
            height: 100vh;
            overflow: hidden;
            margin: 0;
            text-align: center;
          }
    
          .fa-snowflake {
            color: #fff;
            position: absolute;
            top: -20px;
            animation: fall linear forwards;
          }
    
          @keyframes fall {
            to {
              transform: translateY(105vh);
            }
          }
    
          .countdown-container {
            display: flex;
          }
    
          .time {
            display: flex;
            font-size: 1.2em;
            flex-direction: column;
            margin: 0 15px;
          }
    
          .time h1 {
            margin-bottom: 0;
          }
    
          .time small {
            color: #ccc;
          }
    
          /* SOCIAL PANEL CSS */
    
          .social-panel-container {
            position: fixed;
            right: 0;
            bottom: 80px;
            transform: translateX(100%);
            transition: transform 0.4s ease-in-out;
          }
    
          .social-panel-container.visible {
            transform: translateX(-10px);
          }
    
          .social-panel {
            background-color: #fff;
            border-radius: 16px;
            box-shadow: 0 16px 31px -17px rgba(0, 31, 97, 0.6);
            border: 5px solid #001f61;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            font-family: "Muli";
            position: relative;
            height: 169px;
            width: 370px;
            max-width: calc(100% - 10px);
          }
    
          .social-panel button.close-btn {
            border: 0;
            color: #97a5ce;
            cursor: pointer;
            font-size: 20px;
            position: absolute;
            top: 5px;
            right: 5px;
          }
    
          .social-panel button.close-btn:focus {
            outline: none;
          }
    
          .social-panel p {
            background-color: #001f61;
            border-radius: 0 0 10px 10px;
            color: #fff;
            font-size: 14px;
            line-height: 18px;
            padding: 2px 17px 6px;
            position: absolute;
            top: 0;
            left: 50%;
            margin: 0;
            transform: translateX(-50%);
            text-align: center;
            width: 235px;
          }
    
          .social-panel p i {
            margin: 0 5px;
          }
    
          .social-panel p a {
            color: #ff7500;
            text-decoration: none;
          }
    
          .social-panel h4 {
            margin: 20px 0;
            color: #97a5ce;
            font-family: "Muli";
            font-size: 14px;
            line-height: 18px;
            text-transform: uppercase;
          }
    
          .social-panel ul {
            display: flex;
            list-style-type: none;
            padding: 0;
            margin: 0;
          }
    
          .social-panel ul li {
            margin: 0 10px;
          }
    
          .social-panel ul li a {
            border: 1px solid #dce1f2;
            border-radius: 50%;
            color: #001f61;
            font-size: 20px;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 50px;
            width: 50px;
            text-decoration: none;
          }
    
          .social-panel ul li a:hover {
            border-color: #ff6a00;
            box-shadow: 0 9px 12px -9px #ff6a00;
          }
    
          .floating-btn {
            border-radius: 26.5px;
            background-color: #001f61;
            border: 1px solid #001f61;
            box-shadow: 0 16px 22px -17px #03153b;
            color: #fff;
            cursor: pointer;
            font-size: 16px;
            line-height: 20px;
            padding: 12px 20px;
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 999;
          }
    
          .floating-btn:hover {
            background-color: #ffffff;
            color: #001f61;
          }
    
          .floating-btn:focus {
            outline: none;
          }
    
          .floating-text {
            background-color: #001f61;
            border-radius: 10px 10px 0 0;
            color: #fff;
            font-family: "Muli";
            padding: 7px 15px;
            position: fixed;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            text-align: center;
            z-index: 998;
          }
    
          .floating-text a {
            color: #ff7500;
            text-decoration: none;
          }
    
          @media screen and (max-width: 480px) {
            .social-panel-container.visible {
              transform: translateX(0px);
            }
            .floating-btn {
              right: 10px;
            }
          }
        style>
      head>
    
      <body>
        <h1>新年快到了!h1>
        <div class="countdown-container">
          <div class="time">
            <h1 id="days">00h1>
            <small>small>
          div>
          <div class="time">
            <h1 id="hours">00h1>
            <small>small>
          div>
          <div class="time">
            <h1 id="minutes">00h1>
            <small>small>
          div>
          <div class="time">
            <h1 id="seconds">00h1>
            <small>small>
          div>
        div>
    
        <div class="social-panel-container">
          <div class="social-panel">
            <p>
              Created with <i class="fa fa-heart">i> by <a href="#">Florin Popa>
            p>
            <button class="close-btn"><i class="fas fa-times">i>button>
            <h4>Get in touch onh4>
            <ul>
              <li>
                <a href="#">
                  <i class="fab fa-discord">i>
                a>
              li>
              <li>
                <a href="#">
                  <i class="fab fa-twitter">i>
                a>
              li>
              <li>
                <a href="#">
                  <i class="fab fa-linkedin">i>
                a>
              li>
              <li>
                <a href="#">
                  <i class="fab fa-facebook">i>
                a>
              li>
              <li>
                <a href="#">
                  <i class="fab fa-instagram">i>
                a>
              li>
            ul>
          div>
        div>
        <button class="floating-btn">Get in Touchbutton>
      body>
      <script>
        const body = document.body;
        const endTime = new Date("December 31 2021 23:59:59");
        const daysEl = document.getElementById("days");
        const hoursEl = document.getElementById("hours");
        const minutesEl = document.getElementById("minutes");
        const secondsEl = document.getElementById("seconds");
    
        setInterval(updateCountdown, 1000);
        setInterval(createSnowFlake, 50);
    
        function updateCountdown() {
          const startTime = new Date();
          const diff = endTime - startTime;
          const days = Math.floor(diff / 1000 / 60 / 60 / 24);
          const hours = Math.floor(diff / 1000 / 60 / 60) % 24;
          const minutes = Math.floor(diff / 1000 / 60) % 60;
          const seconds = Math.floor(diff / 1000) % 60;
          daysEl.innerHTML = days;
          hoursEl.innerHTML = hours < 10 ? "0" + hours : hours;
          minutesEl.innerHTML = minutes < 10 ? "0" + minutes : minutes;
          secondsEl.innerHTML = seconds < 10 ? "0" + seconds : seconds;
        }
    
        function createSnowFlake() {
          const snow_flake = document.createElement("i");
          snow_flake.classList.add("fas");
          snow_flake.classList.add("fa-snowflake");
          snow_flake.style.left = Math.random() * window.innerWidth + "px";
          snow_flake.style.animationDuration = Math.random() * 3 + 2 + "s"; // between 2 - 5 seconds
          snow_flake.style.opacity = Math.random();
          snow_flake.style.fontSize = Math.random() * 10 + 10 + "px";
    
          document.body.appendChild(snow_flake);
    
          setTimeout(() => {
            snow_flake.remove();
          }, 5000);
        }
    
        // SOCIAL PANEL JS
        const floating_btn = document.querySelector(".floating-btn");
        const close_btn = document.querySelector(".close-btn");
        const social_panel_container = document.querySelector(
          ".social-panel-container"
        );
    
        floating_btn.addEventListener("click", () => {
          social_panel_container.classList.toggle("visible");
        });
    
        close_btn.addEventListener("click", () => {
          social_panel_container.classList.remove("visible");
        });
      script>
    html>
    
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281
    • 282
    • 283
    • 284
    • 285
    • 286
    • 287
    • 288
    • 289
    • 290
    • 291
    • 292
    • 293
    • 294
    • 295
    • 296
    • 297
    • 298
    • 299
    • 300
    • 301
    • 302
    • 303
    • 304
    • 305
    • 306
    • 307
    • 308
    • 309
    • 310
    • 311
    • 312
    • 313
    • 314
    • 315
    • 316
    • 317
    • 318
    • 319
    • 320
    • 321
    • 322
    • 323
    • 324
    • 325
    • 326
    • 327
    • 328
    • 329
    • 330
    • 331
    • 332
    • 333
    • 334
    • 335
    • 336
    • 337
    • 338
    • 339
    • 340
    • 341

    三、精彩专栏

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

  • 相关阅读:
    2023年【制冷与空调设备运行操作】考试资料及制冷与空调设备运行操作考试试卷
    Windows操作系统 | CMD命令行查看当前用户名
    Vue3属性绑定方式分析
    【分布式搜索引擎elasticsearch】
    经典电源电路基础(变压-整流-滤波-稳压)
    mysql多表记录的操作
    Java读和写文件
    superset运维中遇到的问题
    FTP传输安全问题日渐突出,如何解决替代问题?
    【案例分享】H3C交换机堆叠配置
  • 原文地址:https://blog.csdn.net/QQ_____365392777/article/details/126199495