Flux-Slider icon indicating copy to clipboard operation
Flux-Slider copied to clipboard

fullscreen image support

Open windhood opened this issue 13 years ago • 3 comments

Cool component! is it possible to support image displayed in full screen and can resize if the browser window resized?

windhood avatar Feb 02 '12 09:02 windhood

Hi, making the slider responsive is something I'd like to do but given the way that the code works its not trivial & will likely take some time.

joelambert avatar Feb 10 '12 17:02 joelambert

Not perfect, but might work for some:

    <style>
        body, html {
            padding: 0;
            margin: 0;
        }
        #slider {
            -webkit-transform-origin: 0 0;
        }
    </style>

    <script>
        jQuery(function ($) {
            window.f = new flux.slider('#slider', {
                pagination: false,
                autoplay: true
            });
            window.setTimeout(function () {
                var surface = $('#slider .surface');
                var factor = $(window).width() / surface.width();
                $('#slider').css('transform', 'scale(' + factor + ', ' + factor + ')')
            }, 500);
        });
    </script>

ghost avatar Nov 28 '14 16:11 ghost

Not perfect, but might work for some:

    <style>
        body, html {
            padding: 0;
            margin: 0;
        }
        #slider {
            -webkit-transform-origin: 0 0;
        }
    </style>

    <script>
        jQuery(function ($) {
            window.f = new flux.slider('#slider', {
                pagination: false,
                autoplay: true
            });
            window.setTimeout(function () {
                var surface = $('#slider .surface');
                var factor = $(window).width() / surface.width();
                $('#slider').css('transform', 'scale(' + factor + ', ' + factor + ')')
            }, 500);
        });
    </script>

hellow,i also meeted this question,i try to use it but no work, i hope writer can support fullscreen

JaweenDeng avatar Dec 03 '20 09:12 JaweenDeng