链接.father { width: 300px; height:150px; position: relative; } .son { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
div上下左右居中
原文:https://www.cnblogs.com/chengfengchi/p/10659029.html