0

I want to have a fixed background image on an ::after element. I am using this (valid) shorthand to do so:

 &::after {
content: "";
display: block;
position: absolute;
width: 100%;
bottom: 0;
height: 6vw;
transform: translateY(2vw) rotate(2deg) skewX(2deg);
background: url('../img/marmer.jpg') no-repeat center center/ cover transparent fixed;}

The backgrond image is there(of course), but despite the background-attachment being set as "fixed" it is behaving as "scroll". I did do searching but could not find confirmation this cannot work. Does anybody ever got this working?

DETLEVSKI
  • 45
  • 4
  • Provide a proper [mcve], please. – 04FS Jan 24 '19 at 10:01
  • the issue is the transform .. it's a bug, when transformed fixed no more work (https://stackoverflow.com/questions/39633745/background-attachment-fixed-with-transform-not-working-in-firefox) – Temani Afif Jan 24 '19 at 10:03
  • Ok, the transform is the issue. In FireFox a confirmed bug, but Webkit en Blink have the same issue. Thanks, I will find another solution. – DETLEVSKI Jan 24 '19 at 16:14

0 Answers0