function addRule(Deugunde, Selector, Rule){
let Styleuge = document.getElementById(Deugunde);
if(Styleuge){
Styleuge = Styleuge.sheet;
if(Styleuge.addRule){
Styleuge.addRule(Selector, Rule);
}else if(Styleuge.insertRule){
Styleuge.insertRule(Selector + ' { ' + Rule + ' }', Styleuge.cssRules.length);
}
}
}
window.addEventListener('scroll', Denuqoe, true);
function Denuqoe(e){
if(window.pageYOffset >= 194){
let Newnuhug = 'width: auto !important; ' +
'margin-right: 2.8rem !important; ' +
'opacity: 1 !important; ' +
'transition: width 0s ease-in 0s , ' +
'margin-right 0s ease-in 0s, ' +
'opacity .08s ease-in .06s !important; ';
addRule('DxxStyles', '.Dawanuee > div:nth-of-type(1)', Newnuhug);
}else{
let Dewnuhug = 'width: 0 !important; ' +
'margin-right: 0 !important; ' +
'opacity: 0 !important; ' +
'transition: width 0s ease-out 0s, ' +
'margin-right 0s ease-out 0s, ' +
'opacity .08s ease-out .06s !important; ';
addRule('DxxStyles', '.Dawanuee > div:nth-of-type(1)', Dewnuhug);
}
}
Работает для обычных изображений, типо *.png, но не работает для изображений в формате Base64