游客

森鹿语子比二开主题底部美化滚动式图片代码

加友链逛网站时,看到森鹿语、森鹿语二次元网时发现他的底部滚动式图片挺美的。于是果断F12看看,没想到可以整,于是搞下来你们喜欢就带走吧!选择在合适的位置放入代码
如有侵权,麻烦联系我删除!

森鹿语子比二开主题底部美化滚动式图片代码.png

HTML代码

请将以下HTML代码放置在合适的位置,以实现底部滚动图片的效果:

<!-- 底部滚动 -->
<div id="jitheme_home_15_lbtuysjia">
    <div class="home_row">
        <div class="wrapper">
            <div class="home-row-left fa3795 content-area">
                <div class="">
                    <div id="html-box-lbtuysjia" class="html-box">
                        <div id="html-box-head1" class="html-box">
                            <div class="toptu">
                                <div class="item scroll">
                                    <img class="scroll-image lazyloaded" src="https://tu.fxyoy.com/yoy.jpg" data-was-processed="true">
                                    <img class="scroll-image lazyloaded" src="https://tu.fxyoy.com/yoy.jpg" data-was-processed="true">
                                    <div class="sc-1wssj0-17 hVBrzU">
                                        <img src="https://tu.fxyoy.com/yoyo.png" class="lazyloaded" data-was-processed="true">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

CSS代码

紧接着,添加以下CSS代码以确保滚动效果正常显示:

<style type="text/css">
    .home_row {
        margin-top: 16px;
    }

    .home_row_0 {
        margin-top: 3px;
    }

    .home_row_0 .wrapper, 
    .home_row_0 .wrapper .box {
        width: 100% !important;
        box-shadow: none;
    }

    .box {
        box-shadow: none;
    }

    .lazy {
        opacity: 1;
    }

    .sc-1wssj0-17 img {
        width: auto;
    }
    /* Horizontal scroll styles start */
    .item.scroll {
        left: 0px;
        width: 100%;        height: 260px        background-size: auto 100%;
        pointer-events: none;
        background-position: center center;
        background-repeat: no-repeat        transition: opacity 0s ease 0s;
        white-space: nowrap;
        overflow: hidden;
        position: relative;
        font-size: 0;
        background: #000;
        word-wrap: break-word;
        box-sizing: border-box;
        outline: none;
    }

    .item.scroll .scroll-image {
        position: relative;
        height: 100%;
        transform: translateX(0px);
        animation: banner 40s linear infinite;
        opacity: 0.4;
        border: 0;
        -ms-interpolation-mode: bicubic;
        vertical-align: middle;
    }

    .hVBrzU {
        position: absolute;
        top: 70px;
        left: 0px;
        right: 0px;
        text-align: center;
        font-size: 16px;
        white-space: normal;
        width: 100%;
        margin: auto;
    }

    .statics {
        position: static;
        margin-top: -76px;
        padding-left: 16px;
        padding-right: 16px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }

    @media (max-px) {
        .static, 
        .home-course, 
        .home-subjects {
            display: none;
        }
    }

    .statics .flex {
        padding: 0;
        margin: 0;
        display: flex;
    }
    .statics li.st_one {
        flex: 1;
        margin-right: 10px;
        border-radius: 6px;
        overflow: hidden;
        position: relative;
        box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
        list-style: none;
        transition: all .3s ease-out;
    }

    .statics li.st_one:hover {
        transform: translateY(5px);
    }
    .statics li.st_one:last-child {
        margin-right: 0;
    }

    .statics .st_one .card-main {        width: 100%;
    }

    .statics .active-card-title {
        position: absolute;
        bottom: 0;
        color: #fff;
        background: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgba(0, 0, 0, .7)), to(transparent));
        width: 100%;        padding: 12px 20px;        font-size: 16px;
        margin: 0;
    }

    @media screen and (max-width: 900px) {
        .item.scroll {
            height: 200px;
            margin-top: 0;
        }
    }

    .sc-1wssj0-17 img {
        display: inline-block;
    }

    @-webkit-keyframes banner {
        from {
            -webkit-transform: translateX(0);
            -ms-transform: translateX(0);
            transform: translateX(0);
        }
        to {
            -webkit-transform: translateX(-100%);
            -ms-transform: translateX(-100%);
            transform: translateX(-100%);
        }
    }

    @keyframes banner {
        from {
            -webkit-transform: translateX(0);
            -ms-transform: translateX(0);
            transform: translateX(0);
        }
        to {
            -webkit-transform: translateX(-100%);
            -ms-transform: translateX(-100%);
            transform: translateX(-100%);
        }
    }

    .item img {
: inline-block;
        height: auto;
        max-width: 100%;
        vertical-align: middle;
    }
    /* Horizontal scroll styles end */
</style>

希望这段代码能为你的网站增添一抹亮色!如有任何问题或建议,欢迎随时交流。

不懂的直接一起整 代码下载

[未收录,点击提交] [必应已收录] [360已收录] [搜狗已收录] [头条已收录] [神马已收录]
1、本网站名称:樊不烦博客
2、可能会帮助到你: 外链工具 | 娱乐抽奖 | 进站必看
3、如若转载,请注明文章出处:
4、若作商业用途,请联系原作者授权,若本站侵犯了您的权益请 联系站长 进行删除处理。
5、本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
6、本站所有内容均来源于网络,仅供学习与参考,请勿商业运营,严禁从事违法、侵权等任何非法活动,否则后果自负。
7、本站图片资源大多存储在新浪微博,如发现链接失效,请联系我们我们会第一时间更新。

文章很赞!支持一下吧 还没有人为TA充电
为TA充电
还没有人为TA充电
0
  • 支付宝打赏
    支付宝扫一扫
  • 微信打赏
    微信扫一扫
感谢支持
文章很赞!支持一下吧
关于作者
329
16
1
2
躺不平摆不烂日子还得往前看.
评论区
内容为空

这一切,似未曾拥有