简体   繁体   English

具有自定义图像位置的全屏背景幻灯片(每张幻灯片)

[英]Fullscreen background slideshow with custom image positions (per slide)

I've got a client who has a library of images they want to use on a site as fullscreen backgrounds. 我有一个客户,该客户有一个图像库,希望在网站上用作全屏背景。

I'm using the slideshow functionality + api calls in Supersized js to act as the backgrounds for my slides/sub pages in a site navigation, this is playing nicely with my foreground elements to create a good multiple page effect. 我在Supersized js中使用幻灯片功能和api调用来充当站点导航中幻灯片/子页面的背景,这与我的前景元素很好地结合在一起,可以创造出良好的多页效果。

The only issue is that some of their images don't work well centered, and should instead be top aligned (as the focal points of the images get cut off at larger window sizes if they're centered). 唯一的问题是,它们的某些图像不能很好地居中工作,而应该居中对齐(因为如果居中,则图像的焦点会在较大的窗口尺寸处被切断)。

At the moment I'm doing a really nasty manual destroy and rebuild to make the adjustment when it's different (currently the images are managed in a CMS so the user just selects a box if the image is be vert aligned). 目前,我正在做一个非常讨厌的手动销毁和重建,以便在不同时进行调整(当前,图像是在CMS中管理的,因此如果图像是垂直对齐的,则用户只需选择一个框即可)。 This does the trick, but is clunky and has some nasty jumpiness. 这可以解决问题,但是笨拙并且具有令人讨厌的跳跃感。

Do you know of a way to do this without destroying/rebuilding OR is there a different plugin that could handle this (and still work with the pagination functionality I've described?) 您是否知道在不破坏/重建的情况下执行此操作的方法,或者是否有其他插件可以处理此问题(并且仍可以使用我描述的分页功能?)

Thanks guys! 多谢你们!

You can try the jQuery.mb.bandGallery plugin. 您可以尝试使用jQuery.mb.bandGallery插件。 It has the advantage that, in fullscreen, it will resize and center the image to fit the screen. 它的优势在于,在全屏模式下,它将调整图像大小并居中以适合屏幕。

Or you can try/get inspiration from some of the multiple articles and demos at tympanus.net/codrops , like: 或者,您可以在tympanus.net/codrops上尝试/从多篇文章和演示中获取灵感,例如:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM