查看: 7043|回复: 0

前端网页--图片的滑动效果

[复制链接]

10

主题

1

回帖

70

积分

注册会员

Rank: 2

积分
70
发表于 2022-1-7 14:37:52 | 显示全部楼层 |阅读模式
本帖最后由 胡汉九 于 2022-1-7 14:54 编辑

  前端网页--图片的滑动效果
                                                 代码来源:@风火轮技术团队                                                   
(1)设置好需要实现的漫画效果      这里实现的效果是在一个网页界面里面,实现下一张图片
直接覆盖住前面的一张图片,也就是实现了一部漫画的连续
阅读的效果,也就有动画的效果,使得图片的展示更加的生
动形象。
      
LL6L1EAMEO4@_RC$GXMJ4ZV.png
(2)漫画的内容
                     

(3)代码部分
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>小时候和长大以后</title>
    <style>
        *{
            margin:0 ;
            padding: 0;
        }
        div{
            height:700px;
            background-position: top center;
            background-repeat: no-repeat;
            background-size:contain;
            background-attachment:fixed;
        }
        .box1 {
            background-image: url("TP/1.jpg");
        }
      //同样的方法设置好其余的6个盒子来装好其余的6张图片
        .box8{
            height: 750px;
            margin-left: 300px;
            margin-right:300px;
            background-color:#0395e1;
            text-align: center ;
            font-size:50px;
            font-weight: bolder;
            font-family: 宋体;
            font-style:italic;
        }
        .box9{
            height: 750px;
            margin-left: 300px;
            margin-right:300px;
            background-color:#0395e1;
            text-align: center ;
            font-size:50px;
            font-weight: bolder;
            font-family: 宋体;
            font-style:italic;
        }
    </style>

</head>
<body>

    <div class="box8">
        <br>
        <br>
        <p><h1>
        <span style="color:red;"></span><span style="color:blue"></span>
        <span style="color:#452356"></span><span style="color:#556677"></span>

    </h1></p>
        <br>
        <p><h1>
       <span style="color:#883311">小时候</span><span style="color:#56224477"></span><span style="color:#665511;">长大后</span>
    </h1></p>
    </div>

    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
    <div class="box4"></div>
    <div class="box5"></div>
    <div class="box6"></div>
    <div class="box7"></div>

    <div class="box9">
        <br>
        <br>
        <h1 style="color:blue;">感谢欣赏</h1>
        <br>
        <h1 style="color:#771199">下期再见</h1>
    </div>
</body>
</html>



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|风火轮WIKI|手机版|小黑屋|深圳风火轮团队 ( 粤ICP备17095099号 )

GMT+8, 2024-4-20 18:01 , Processed in 0.056563 second(s), 22 queries .

快速回复 返回顶部 返回列表
 
【客服1】 商务合作 15289193
【客服2】 业务洽谈 13257599
【客服3】 售前咨询 510313198
【邮箱】
smartfire@smartfire.cn