如何使图像在其他图像内部滚动?
问题描述:
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>