html程序员表白前端网页源码 3D动态相册制作html

❤ 精彩专栏推荐👇🏻👇🏻👇🏻
💂 作者主页: 【进入主页—🚀获取更多源码】
🎓 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.视频演示

73 3D旋转木马相册(自动转)

🧩 2.图片演示

在这里插入图片描述


四、💒 网站代码

🧱HTML结构代码

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>3D carousel</title>

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

</head>

<body>

    <div id="drag-container">
        <div id="spin-container">

            <img src="img/pexels-photo-206395.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" alt="">
            <img src="img/pexels-photo-1391498.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" alt="">
            <img src="img/pexels-photo-1382731.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" alt="">
            <img src="img/pexels-photo-1758144.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" alt="">
            <img src="img/pexels-photo-1382734.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" alt="">
            <img src="img/pexels-photo-1462636.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" alt="">


            <a target="_blank" href="img/pexels-photo-139829.jpeg">
      <img src="img/pexels-photo-139829.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" alt="">
    </a>

            <video controls autoplay="autoplay" loop>
      <source src="https://blz-videos.nosdn.127.net/1/OverWatch/OVR_D.VA_SHOOTING_STAR_zhCN_YT_PC_3.mp4?s=338c48ac2dfcb1d4c0689968b5baf94eee6ca0c1&profile_id=165&oauth2_token_id=57447761" type="video/mp4">
    </video>

            <!-- Dòng chữ ở giữa vòng xoay -->
            <p>3D旋转木马</p>
        </div>
        <div id="ground"></div>
    </div>

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

</body>

</html>




🏠CSS样式代码

* {
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    overflow: hidden;
    display: flex;
    background: #111;
    perspective: 1000px;
    transform-style: preserve-3d;
}

#drag-container,
#spin-container {
    position: relative;
    display: flex;
    margin: auto;
    transform-style: preserve-3d;
    transform: rotateX(-10deg);
}

#drag-container img,
#drag-container video {
    transform-style: preserve-3d;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    line-height: 200px;
    font-size: 50px;
    text-align: center;
    box-shadow: 0 0 8px #fff;
    -webkit-box-reflect: below 10px linear-gradient(transparent, transparent, #0005);
}

#drag-container img:hover,
#drag-container video:hover {
    box-shadow: 0 0 15px #fffd;
    -webkit-box-reflect: below 10px linear-gradient(transparent, transparent, #0007);
}

#drag-container p {
    font-family: Serif;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(90deg);
    color: #fff;
}

#ground {
    width: 900px;
    height: 900px;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(90deg);
    background: -webkit-radial-gradient(center center, farthest-side, #9993, transparent);
}

#carousel-container {
    width: 100%;
    height: 100%;
}

@keyframes spin {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

@keyframes spinRevert {
    from {
        transform: rotateY(360deg);
    }
    to {
        transform: rotateY(0deg);
    }
}






五、🎁更多源码

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

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

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

好的,以下是一个简单的HTML动态照片墙的实现方式: 首先,我们需要创建一个包含所有照片的div容器,并为每张照片设置一个class属性,如下所示: ```html <div class="photo-wall"> <img class="photo" src="photo1.jpg" /> <img class="photo" src="photo2.jpg" /> <img class="photo" src="photo3.jpg" /> <img class="photo" src="photo4.jpg" /> <img class="photo" src="photo5.jpg" /> <img class="photo" src="photo6.jpg" /> <img class="photo" src="photo7.jpg" /> <img class="photo" src="photo8.jpg" /> </div> ``` 接下来,我们需要使用CSS来对照片进行布局和动画效果。首先,我们将设置.photo-wall容器为相对定位,并将.photo照片设置为绝对定位: ```css .photo-wall { position: relative; width: 100%; height: 500px; overflow: hidden; } .photo { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 1s ease-in-out; } ``` 接下来,我们将为每张照片设置不同的top和left值,以实现不同的布局效果: ```css .photo:nth-child(1) { top: 0; left: 0; width: 25%; height: 50%; } .photo:nth-child(2) { top: 0; left: 25%; width: 25%; height: 50%; } .photo:nth-child(3) { top: 0; left: 50%; width: 25%; height: 50%; } .photo:nth-child(4) { top: 0; left: 75%; width: 25%; height: 50%; } .photo:nth-child(5) { top: 50%; left: 0; width: 25%; height: 50%; } .photo:nth-child(6) { top: 50%; left: 25%; width: 25%; height: 50%; } .photo:nth-child(7) { top: 50%; left: 50%; width: 25%; height: 50%; } .photo:nth-child(8) { top: 50%; left: 75%; width: 25%; height: 50%; } ``` 最后,我们将使用JavaScript来设置动画效果,以便在页面加载时逐渐显示每张照片: ```javascript var photos = document.querySelectorAll('.photo'); function showPhotos() { var delay = 0; for (var i = 0; i < photos.length; i++) { var photo = photos[i]; setTimeout((function(photo) { return function() { photo.style.opacity = 1; } })(photo), delay); delay += 100; } } window.onload = function() { showPhotos(); }; ``` 以上就是一个简单的HTML动态照片墙的实现方式。你可以根据自己的需求进行修改和扩展。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

web学生网页设计

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

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

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

打赏作者

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

抵扣说明:

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

余额充值