css实现垂直居中的方法如下: 1、利用line-height实现居中,这种方法适合纯文字类的; <!-- css --> <style> .parents { height: 400px; line-height: 400px; width: 400px; border: 1px so...