如何使图像在其他图像内部滚动? [英] How to make image scrolling effect inside other image?

查看:135
本文介绍了如何使图像在其他图像内部滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做类似这样的事情,就像在

i want to make something similar like this, to promote my sites in scrolling effect just like in this page

我发现计算机图像只是图像:

I found that image from computer is just a image:

网站内部滚动的图片也是如此:

and site scrolling inside is image also:

所以我的问题是,如何使其他图像在该计算机PC上滚动,例如在我提供的原始站点上,也许是一些JS?

So my question is , how to make other image to scroll inside that computer PC, like on original site i provided, maybe some JS ?

这类似于解决方案我发现:

HTML :

<ul id="scroller">
<li><img src="https://i.stack.imgur.com/lPcRz.jpg" width="400" 
height="1000"></li>
</ul>

JS :

    (function($) {
        $(function() { //on DOM ready
            $("#scroller").simplyScroll({
                customClass: 'vert',
                orientation: 'vertical',
                auto: true,
                manualMode: 'end',
                frameRate: 8,
                speed: 3
            });
        });
    })(jQuery);

和CSS:

/* Container DIV */
    .simply-scroll {
        width: 400px;
        height: 1000px;
        margin-bottom: 1em;
    }

但是如何在PC图像中创建该图像以及如何上下移动?

but how to make this image inside PC image, and to move up and down ?

推荐答案

这就是您所需要的.

.computer-empty {
    overflow: hidden;
    position: relative;
    width: 540px;
}
.computer-screen {
    overflow: hidden;
    position: absolute;
    height: 247px;
    width: 445px;
    left: 50px;
    top: 20px;
}
.screen-landing {
    left: 0;
    line-height: 0;
    position: absolute;
    width: 100%;
    transition: all 6s;
    -o-transition: all 6s;
    -ms-transition: all 6s;
    -moz-transition: all 6s;
    -webkit-transition: all 6s;
}
.screen-landing:hover {
    cursor: pointer;
    margin-top: -1036px;
}
img {
    max-width: 100%;
    width: auto\9;
    height: auto;
    vertical-align: middle;
    border: 0;
    -ms-interpolation-mode: bicubic;
}
.computer-empty img.computer {
    width: 100%;
}

<div class="text-align-center computer-empty">
                
                <a target="_blank" href="http://irontemplates.com/demos/redirect.php?theme=The%20Rise" class="">
                <div class="computer-screen">
                    <div class="screen-landing">
                        <img src="http://fwrd.irontemplates.com/home/img/the_rise.jpg" alt="demo - the rise">
                    </div>
                </div>
                <img class="computer" src="http://fwrd.irontemplates.com/home/img/computer.jpg" alt="computer">
                </a>
                <h1>The Rise</h1>
            </div>

这篇关于如何使图像在其他图像内部滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆