问题
Added some position: sticky
property to my webpage. On Desktop browser work fine but sucks in mobiles.
回答1:
sticky
property for Chrome and Safari for iOS needs to be set with -webkit
vendor first:
.element {
position: -webkit-sticky;
position: sticky;
}
You can check about browser compatibility in canIUse
来源:https://stackoverflow.com/questions/45249771/how-to-enable-css-position-sticky-in-mobile-browsers