css - Why on Safari the transform translate doesn't work correctly? -
i use code center div
in view:
.centered { position: fixed; top: 50%; left: 50%; /* bring own prefixes */ transform: translate(-50%, -50%); }
it works great on firefox, internet explorer , chrome, not in safari.
what's workaround center image in safari web browser?
you need vendor prefixed style.
.centered { position: fixed; top: 50%; left: 50%; /* bring own prefixes */ -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); }
please refer below know browser supports , prefix has added. http://caniuse.com/#feat=transforms2d
Comments
Post a Comment