Since you do not use z in translation, you can change it to translate2d, which works:
demo
.scroller{ width: 300px; height: 500px; border: 3px solid red; border-radius: 30px; overflow: hidden; } .scroller-content{ width: 300px; height: 300px; background: green; -webkit-transform: translate(0, -8px); }
This is described in the link provided by Chtiwi Malek, but it says that it is only for a mobile browser, and I have this problem on the desktop.
change
It also works (at least on the desktop) if you set the overflow and conversion to the same element
.scroller{ width: 300px; height: 500px; border: 3px solid red; border-radius: 30px; overflow: hidden; -webkit-transform: translate3d(0, -8px, 5px); } .scroller-content{ width: 300px; height: 300px; background: green; }
source share