多图像滑块

发布于 2024-11-29 08:32:12 字数 217 浏览 0 评论 0原文

苹果的 iMac 页面上有一个令人惊叹的滑块。

这是标准图像滑块,但看起来它利用了在单张幻灯片中不同时间出现的多个图像。

有人有一个教程的链接来解释这是如何完成的吗?这种效果有一些令人惊叹的因素。

链接如下:http://www.apple.com/imac/

Apple's iMac page has an amazing slider on it.

It's your standard image slider, but it looks like it utilizes multiple images that appear at different times in a single slide.

Anyone have a link to a tutorial that explains how this was done? The effect has some serious wow factor.

Here's the link: http://www.apple.com/imac/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

再见回来 2024-12-06 08:32:12

滑块注意事项:

  • 使用插件系统。有很多强大的插件系统。如果您使用 jQuery,我推荐cycle 插件。它是非常可定制的。
  • 底部的导航圆圈都使用精灵(意味着一张图像。) 然后,他们使用 background-position 一次显示图像的适当部分。
  • 使用视觉空白。 Apple 的滑块看起来如此出色的原因之一是元素并不局促。他们有很大的呼吸空间。

上一张/下一张图片的注释:


/*this will fade only the opacity property in .25 seconds for both in and out */
-webkit-transition: .25s opacity ease-out;
-moz-transition: .25s opacity ease-out;
transition: .25s opacity ease-out;

Notes on sliders:

  • Use a plug-in system. There are many robust ones. If you are using jQuery, I recommend the cycle plugin. It is extremely customizable.
  • The navigation circles at the bottom all use a sprite (means one image.) They then use background-position to display the proper portion of the image at one time.
  • Use visual whitespace. One reason Apple's slider looks so good is because the elements aren't cramped. They have lots of room to breathe.

Notes on the previous/next images:

  • Position an <a> on the side and have the actual contents wrapped in another tag. Apple used a <b> for this. I'd probably use a <span>. Use opacity to make it invisible.
  • The <a> tag needs to cover a large area. You probably want to have it be 100% of the containers height, and be wide enough for the mouse to find it.
  • The inner tag contains the text or image you will display. Apple wrote next for the text, but then uses a background-image and shifts the text off-screen with text-indent.
  • Make inner tag visible when you hover on the <a>. Again, you'll use opacity for this.
  • Uses CSS3 transitions for the fade-in/fade-out. Do some Googling to learn more about them.
  • Use JavaScript to determine whether you should show the <a> at all. This comes built-in to many slideshow plug-ins. If you are using jQuery, I recommend the cycle plugin.

/*this will fade only the opacity property in .25 seconds for both in and out */
-webkit-transition: .25s opacity ease-out;
-moz-transition: .25s opacity ease-out;
transition: .25s opacity ease-out;
终陌 2024-12-06 08:32:12

AnythingSlider是迄今为止我发现的最接近苹果滑块的东西。它独立地为每张幻灯片的元素设置动画。查看 FX 演示。

http://proloser.github.com/AnythingSlider/demos.html

AnythingSlider is the closest thing I have found to apple's slider so far. It animates elements of each slide independently. Check out the FX demo.

http://proloser.github.com/AnythingSlider/demos.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文