Deprecated: Typecho\Widget\Request::getServer(): Implicitly marking parameter $default as nullable is deprecated, the explicit nullable type must be used instead in D:\PHP_HOME\www\gp_blog\var\Typecho\Widget\Request.php on line 219

Deprecated: Typecho\Request::getServer(): Implicitly marking parameter $default as nullable is deprecated, the explicit nullable type must be used instead in D:\PHP_HOME\www\gp_blog\var\Typecho\Request.php on line 349

Deprecated: Typecho\Widget\Response::goBack(): Implicitly marking parameter $suffix as nullable is deprecated, the explicit nullable type must be used instead in D:\PHP_HOME\www\gp_blog\var\Typecho\Widget\Response.php on line 158

Deprecated: Typecho\Widget\Response::goBack(): Implicitly marking parameter $default as nullable is deprecated, the explicit nullable type must be used instead in D:\PHP_HOME\www\gp_blog\var\Typecho\Widget\Response.php on line 158
div 内 文字居中方式 - 开发者

1、上下居中(垂直居中)

style=“height: 40px;
background-color: #FFFFFF;
display: flex;
flex-direction: row;
align-items: center;

方法2

vertical-align: middle;

2、左右居中(水平居中)

style=“height: 40px;
background-color: #FFFFFF;
display: flex;
flex-direction: row;
justify-content: center;

3、左右居中(水平居中)

display: flex;
flex-direction: column;
align-items: center;

标签: none

评论已关闭