rdd
@rdd
Только хардкор

Дергается фиксированный фон у блока в ie?

При скроле мышкой по скроллбару - все ок, чудеса начинаются при скролле колесиком. Картинка, заданная фиксированным фоном с "cover" или у фиксированного блока, просто с "cover" или без него, все одно.
Может, кто сталкивался?
В Html теге фона нету.
В общем, решение очевидно (первый вариант):
My final fix is based on all the answers I've found:

On the main css (totally fixes the problem on ie10 & 11)

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) 
{
    html{
        overflow: hidden;
        height: 100%;    
    }
    body{
        overflow: auto;
        height: 100%;
    }
}
For ie9, ie8 and ie7 I've added the code (without media query) in a separate hacksheet:

<!--[if lte IE 9]>
    <style type=text/css>
       html{
           overflow: hidden;
           height: 100%;    
       }
       body{
           overflow: auto;
           height: 100%;
       }
    </style>
<![endif]-->


второй мне нравится больше:
if(navigator.userAgent.match(/Trident\/7\./)) { // if IE
	$('html').on("mousewheel", function () {
		// remove default behavior
		event.preventDefault();
		//scroll without smoothing
		var wheelDelta = event.wheelDelta;
		var currentScrollPosition = window.pageYOffset;
		window.scrollTo(0, currentScrollPosition - wheelDelta);
	});
}
  • Вопрос задан
  • 237 просмотров
Решения вопроса 1
rdd
@rdd Автор вопроса
Только хардкор
Не знаю, почему, но работает. Хотелось бы, что-бы кто-нибудь объяснил
My final fix is based on all the answers I've found:

On the main css (totally fixes the problem on ie10 & 11)

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) 
{
    html{
        overflow: hidden;
        height: 100%;    
    }
    body{
        overflow: auto;
        height: 100%;
    }
}
For ie9, ie8 and ie7 I've added the code (without media query) in a separate hacksheet:

<!--[if lte IE 9]>
    <style type=text/css>
       html{
           overflow: hidden;
           height: 100%;    
       }
       body{
           overflow: auto;
           height: 100%;
       }
    </style>
<![endif]-->
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
@Waliant
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы