Background Image in the content slider is not responsive in mobile View
Автор: David K.
Просмотрено 84,
Подписчики 2,
Размещенный 0
I need help in making background images of my content slider responsive.I have tried the custom code shared by kolosim here before but it does not seem to work. kindly someone help with this. This is the link to the website https://www.mobile-store.co.ke/
I have attached also the screenshot of the background images.
Размещено
(It > En) ... ...to try to fix the current situation a bit, try replacing my previous code with this one for your page selector contentslider (157):
<script>
$( document ).ready(function() {// K>;
/** --- resize ratio x WSx5 ContenSlider by KolAsim --- **/
ritardoK = 1; // secondi di ritardo;
wK = 1920; // larghezza immagine (valore pixel (o rapporto razionale W));
hK = 770; // altezza immagine (valore pixel (o rapporto razionale H));
setTimeout(function(){//K1>;
ridimensionaK();
}, ritardoK * 1000); //K1<<; //non toccare;
}); //K<<;
$(window).on('resize', ridimensionaK);//Kr > | <<
//---------------f K2-----------------------------
function ridimensionaK() {//K2>;
setTimeout(function(){ //K3>;
wwK= window.innerWidth
|| document.documentElement.clientWidth
|| document.body.clientWidth;
ratio=Math.round(wwK/wK*100)/100;
CShK=hK*ratio;
$("#imPageRow_1,#imCell_157, #imCell_157 div").css('max-height', CShK);
$(".slide-title").css("font-size","3vW"); // x TITOLO
$(".slide-description").css("font-size","2vW"); // x DESCRIZIONE;
$(".slide-image-content").css("width","100%");
$(".slide-txt-container").css("background"," rgba(255,255,255,0.8)")
.css("width","40vW").css("z-index",1).css("border-radius","30px")
.css("margin","auto");
}, 0); //K3<<;
} //K2<<;
</script>
.
ciao
.
Автор
Thank you so much, that worked... You are the OG
... I checked online, I would say that the result is quite acceptable...
... thanks to you too for appreciating it...
.
ciao
.