简体   繁体   English

具有固定内容的图像滑块

[英]Image Slider with fixed content

i want to build a slider similar to https://www.airbnb.com.sg/ 我想建立一个类似于https://www.airbnb.com.sg/的滑块

where the content remains constant , just the background image gets slided. 在其中内容保持不变的情况下,仅滑动背景图像。

can you suggest me any jquery plugin with similar requirements? 你能建议我任何有类似要求的jQuery插件吗?

If I were in your place, I would use flex slider to slide images in background and place my static content over slider using css absolute positioning. 如果我在您的位置,则可以使用flex滑块在背景中滑动图像,并使用CSS绝对定位将静态内容放在滑块上。

first create a big slider using flex slider. 首先使用flex滑块创建一个大滑块。

create your static content, for example: 创建您的静态内容,例如:

<div id="staticContent"> 
   <!-- your content such as form or anything goes here-->
</div>

make this static content div absolute positioned. 使此静态内容div绝对定位。

#staticContent{
  position:absolute;
  left:20%;
  top:20%; /*change these values*/
}

您可以尝试NivoSlider。这是一个不错的选择。

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

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