Update snippet structure
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
### Transform centering
|
||||
---
|
||||
title: Transform centering
|
||||
tags: layout,intermediate
|
||||
---
|
||||
|
||||
Vertically and horizontally centers a child element within its parent element using `position: absolute` and `transform: translate()` (as an alternative to `flexbox` or `display: table`). Similar to `flexbox`, this method does not require you to know the height or width of your parent or child so it is ideal for responsive applications.
|
||||
|
||||
@ -43,4 +46,5 @@ Note: Fixed height and width on parent element is for the demo only.
|
||||
|
||||
- https://caniuse.com/#feat=transforms2d
|
||||
|
||||
<!-- tags: layout -->
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user