This question already has an answer here:
- CSS-Filter on parent breaks child positioning 1 answer
I'm on Chrome 68.
Whenever I have filter: invert(xxx);
on the <body>
, anything positioned as fixed
doesn't stick to the screen, it scrolls with everything.
Demo with filter: invert(xxx);
body{
height: 8000px;
filter: invert(0.85);
}
div{
position: fixed;
top: 0;
left: 0;
height: 100px;
width: 100px;
border: 1px solid black;
}
<div></div>
Demo without filter: invert(xxx);
body{
height: 8000px;
}
div{
position: fixed;
top: 0;
left: 0;
height: 100px;
width: 100px;
border: 1px solid black;
}
<div></div>
EDIT: Works fine on Chrome 67, but not on Chrome 68.