Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将文本置于中间y轴的标记css_Css_Html_Tags - Fatal编程技术网

将文本置于中间y轴的标记css

将文本置于中间y轴的标记css,css,html,tags,Css,Html,Tags,我使用了一个标签,并将我的内容设置为背景色、高度和宽度 我使用文本对齐:居中;将文本与x轴的中心对齐 如何在y轴的中间对齐?使用flexbox,您可以指定对齐项目:居中;证明内容:中心将文本居中放置在元素中 p{ 背景:红色; 高度:100px; 宽度:100px; 显示器:flex; 对齐项目:居中; 证明内容:中心; } 标签谷歌“垂直对齐”。

我使用了一个标签,并将我的内容设置为背景色、高度和宽度

我使用文本对齐:居中;将文本与x轴的中心对齐


如何在y轴的中间对齐?

使用flexbox,您可以指定
对齐项目:居中;证明内容:中心
将文本居中放置在元素中

p{
背景:红色;
高度:100px;
宽度:100px;
显示器:flex;
对齐项目:居中;
证明内容:中心;
}
标签

谷歌“垂直对齐”。