当外面的容器的height使用百分比时,如何设置line-height可使里面的文字垂直居中

解决方法1、 父元素设置display:table 须要居中的元素 设置 vertical-align:middle; display:table-cell;css <html> <head> <meta charset="UTF-8"> <title></title> </head> <style type="text/css"> html
相关文章
相关标签/搜索