首先你要知道,margin后面是有4个参数的。例如:margin:1px1px1px1px分别表示上、右、下、左。如果只写2个参数的话,比如:margin:1px2px那么着是代表上下都为1px左右都为2px.至于居中,很明显,margin:0auto