<legend id='2evpb'><style id='2evpb'><dir id='2evpb'><q id='2evpb'></q></dir></style></legend>

      <i id='2evpb'><tr id='2evpb'><dt id='2evpb'><q id='2evpb'><span id='2evpb'><b id='2evpb'><form id='2evpb'><ins id='2evpb'></ins><ul id='2evpb'></ul><sub id='2evpb'></sub></form><legend id='2evpb'></legend><bdo id='2evpb'><pre id='2evpb'><center id='2evpb'></center></pre></bdo></b><th id='2evpb'></th></span></q></dt></tr></i><div id='2evpb'><tfoot id='2evpb'></tfoot><dl id='2evpb'><fieldset id='2evpb'></fieldset></dl></div>
      <tfoot id='2evpb'></tfoot>
      • <bdo id='2evpb'></bdo><ul id='2evpb'></ul>

    1. <small id='2evpb'></small><noframes id='2evpb'>

      是否可以使用固定高度的全宽 JSSOR 滑块?

      时间:2024-04-19
        1. <i id='YVOVv'><tr id='YVOVv'><dt id='YVOVv'><q id='YVOVv'><span id='YVOVv'><b id='YVOVv'><form id='YVOVv'><ins id='YVOVv'></ins><ul id='YVOVv'></ul><sub id='YVOVv'></sub></form><legend id='YVOVv'></legend><bdo id='YVOVv'><pre id='YVOVv'><center id='YVOVv'></center></pre></bdo></b><th id='YVOVv'></th></span></q></dt></tr></i><div id='YVOVv'><tfoot id='YVOVv'></tfoot><dl id='YVOVv'><fieldset id='YVOVv'></fieldset></dl></div>

            <small id='YVOVv'></small><noframes id='YVOVv'>

            <tfoot id='YVOVv'></tfoot>
                <tbody id='YVOVv'></tbody>
              <legend id='YVOVv'><style id='YVOVv'><dir id='YVOVv'><q id='YVOVv'></q></dir></style></legend>
                <bdo id='YVOVv'></bdo><ul id='YVOVv'></ul>

                本文介绍了是否可以使用固定高度的全宽 JSSOR 滑块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试在网站上使用 JSSOR 滑块.我已经想出了如何让它全宽,但现在它都是 响应式",所以它甚至可以缩放幻灯片的 高度.我想要 固定高度 (400px) 和 100% 宽度.我几乎做到了,所以 "slider1_container" 是全宽和 400px 高,但它的内容仍然是响应式的.

                I'm trying to use JSSOR slider on a website. I already figured out how to make it full width but now it's all "responsive" so it scales even the height of the slide. I would like to have fixed height (400px) and 100% width. I almost achieved it so the "slider1_container" is full width and 400px height but the content of it is still responsive.

                有网站:http://carwash-horovice.cz

                感谢您能给我的任何帮助.

                I appreciate any help you can give me.

                推荐答案

                要缩放 jssor 滑块,它会始终保持纵横比.不缩放高度就无法缩放.

                To scale jssor slider, it will always keep aspect ratio. You cannot scale with without scaling height.

                如果你想保持原来的高度,你可以通过删除以下代码来禁用缩放.

                If you want to keep the original height, you can disable scaling by removing the following code.

                    function ScaleSlider() {
                        var parentWidth = $('#slider1_container').parent().width();
                        if (parentWidth) {
                            jssor_slider1.$ScaleWidth(parentWidth);
                        }
                
                        else
                            $JssorUtils$.$Delay(ScaleSlider, 30);
                    }
                
                    ScaleSlider();
                    $(window).bind("load", ScaleSlider);
                    $(window).bind("resize", ScaleSlider);
                    $(window).bind("orientationchange", ScaleSlider);
                

                此外,为了让您的页面保持响应并保持滑块自动居中,您可以用包装器包装滑块.

                In addition, to keep your page responsive and keep the slider auto center, you can wrap the slider by a wrapper.

                <div style="position: relative; width: 100%; overflow: hidden;">
                    <div style="position: relative; left: 50%; width: 5000px; text-align: center; margin-left: -2500px;">
                
                        <!-- use 'margin: 0 auto;' to auto center element in parent container -->
                        <div id="slider1_container" style="...margin: 0 auto;..." ...>
                        </div>
                
                    </div>
                </div>
                

                这篇关于是否可以使用固定高度的全宽 JSSOR 滑块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:JQueryUI 滑块 - 当前位置的工具提示 下一篇:具有 2 种不同颜色的 JavaFX 滑块,例如选定区域为绿色,未选定区域为红色

                相关文章

                  <bdo id='IZFJT'></bdo><ul id='IZFJT'></ul>

                <legend id='IZFJT'><style id='IZFJT'><dir id='IZFJT'><q id='IZFJT'></q></dir></style></legend>
                1. <tfoot id='IZFJT'></tfoot>

                    <small id='IZFJT'></small><noframes id='IZFJT'>

                    <i id='IZFJT'><tr id='IZFJT'><dt id='IZFJT'><q id='IZFJT'><span id='IZFJT'><b id='IZFJT'><form id='IZFJT'><ins id='IZFJT'></ins><ul id='IZFJT'></ul><sub id='IZFJT'></sub></form><legend id='IZFJT'></legend><bdo id='IZFJT'><pre id='IZFJT'><center id='IZFJT'></center></pre></bdo></b><th id='IZFJT'></th></span></q></dt></tr></i><div id='IZFJT'><tfoot id='IZFJT'></tfoot><dl id='IZFJT'><fieldset id='IZFJT'></fieldset></dl></div>