1.寬度和高度:
width:200px; height:200px;
2.邊框border
設置border像素,虛線/實線,顏色
border-radius:8px; //表示邊框的圓角弧度;
3.內填充padding (面試可能出現的問題)
分爲四個方向:top right bottom left(上/右/下/左)
padding:10px; //表示四個方向均爲10px;
padding:10px 20px; //表示上下爲10px 左右爲20px
padding:10px 20px 30px; //表示上爲10px 左右爲20px 下30px;
padding:10px 20px 30px 40px; //表示上/右/下/左分別爲10px 20px 30px 40px;
4.外邊距margin
同padding一致,都需要四個方向的像素問題。