Flux-Slider
Flux-Slider copied to clipboard
fullscreen image support
Cool component! is it possible to support image displayed in full screen and can resize if the browser window resized?
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.
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>
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