CSS Advanced
Emmet Tips
+ adjacent, > child, * counta+ul>li*3
a+ul.nav-items>li.nav-item*3
link:cssCreates the link tag
line-heightVertical centering for single-line text
display: flexComposed of a container and child elements as items
Layout Tips
Box modelThink of everything as squares!
position: absolute;Use absolute when you want to place something at the edge of something
Use flex when you want to place on the side
flexParent element (container)
The element with
display: flex;appliedinline, block do not apply
Child elements (items)
main axis
justify-content
cross axis
align-items: Mainly used for vertical alignment
rem: A typical browser is 16px
box-sizing: border-box;margin: top-bottom / left-right;
Last updated