margin_top
margin_top:-100px; height:200px;
margin_top:-100px; height:200px;
top
top:-100px; height:200px;
top:-100px; height:200px;
transform
transform: translateY(-100px); height:200px;
transform: translateY(-100px); height:200px;
margin_top
margin_top:-50%; height:200px;
margin_top:-50%; height:200px;
top
top:-50%; height:200px;
top:-50%; height:200px;
transform
transform: translateY(-50%); height:200px;
transform: translateY(-50%); height:200px;
margin_bottom(%)
margin_bottom:50%
block
%とは、そのブロックの横幅に対しての%。 上の場合、ピンクのブロックの横幅が、約348pxなので、約174pxの マージンになる。
margin_bottom(rem)
margin_bottom:11.6rem
block
remとは、基本級数に対しての相対的単位。 現在、基本給数が15pxなので、左の約174pxのmarginと合わせるためには、174/15=11.6となる。
margin_bottom(em)
margin_bottom:11.6em
block
emとは、基本級数に対しての相対的単位。 現在、基本給数が15pxなので、左の約174pxのmarginと合わせるためには、174/15=11.6となる。