CSS 中的居中文本

Centering Text In CSS

抱歉,我知道这非常简单,但我想不通。

这是我当前的 Css 风格

@import url(https://fonts.googleapis.com/css?family=Advent+Pro:100);
html { 
}
#overlay {
font-family: 'Advent Pro', sans-serif;
font-size: 7em;
margin: .2em .5em;
color: rgba(255, 255, 255, 1);
position: fixed;
right: 0;
}
video#bgvid { 
position: fixed; 
right: 0; 
top: 0;
width: 100%; 
height: auto; 
z-index: -100;
background-size: cover;
}

如何将#overlay居中?!

使用text-align:center。如果需要,您可能需要将宽度设置为 100%。

希望对您有所帮助。