简体   繁体   English

jQuery滑块图像居中建议

[英]jQuery slider image centering advice

I'm looking for a slider which you can have a background image eg 1920px wide 400px high, but the main content of the slider is something like 1000px, the slider will automatically scale down until it gets to the center of the image? 我正在寻找一个可以有背景图像的滑块,例如1920像素宽,400像素高,但是滑块的主要内容是1000像素,滑块会自动缩小直到到达图像中心? A little like http://www.morganstanley.com/ . 有点像http://www.morganstanley.com/

I've had a look at JSSOR but for the life of me I can't figure out how to do it. 我看过JSSOR,但是对于我一生来说,我不知道该怎么做。

Thanks for reading 谢谢阅读

Please place your slider in the following wrapper, 请将滑杆放在以下包装纸中,

<div style="position: relative; width: 100%; background-color: #003399; overflow: hidden;">
    <div style="position: relative; left: 50%; width: 5000px; text-align: center; margin-left: -2500px;">
        <!-- Jssor Slider Begin -->
        <div id="slider1_container" style="position: relative; margin: 0 auto; ...;">
            ...
        </div>
        <!-- Jssor Slider End -->
    </div>
</div>

You will get get an example as http://www.jssor.com/testcase/auto-center-slider-with-no-scale.source.html 您将获得一个示例, 网址http://www.jssor.com/testcase/auto-center-slider-with-no-scale.source.html

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

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