Tag:Translate horizontally and vertically
-
Translate (- 50%, – 50%) in CSS to achieve horizontal and vertical centering effect
Translate (- 50%, – 50%) attribute:Up and left, move 50% of its length and width to center it. Different from using margin to realize centering, margin must know its width and height, while translate can center without knowing its width and height. The percentage in tranlate function is relative to its width and height(when top […]