Html 如何集中特定内容?

Html 如何集中特定内容?,html,css,center,Html,Css,Center,我有一张幻灯片,下面有两张图片和一段文字。我只想把它放在头的中间。不知什么原因,我在挣扎 应该以我的身体和 我已经尝试与以下人员合作: display: flex; align-items: center; justify-content: center; 这解决了我在头球上的问题,但在剩下的比赛中没有解决 @font-face{ 字体系列:原始; src:url('Roboto-Thin.ttf')格式('truetype'); } img{ 边框右上角半径:20px; 边

我有一张幻灯片,下面有两张图片和一段文字。我只想把它放在头的中间。不知什么原因,我在挣扎

应该以我的身体和

我已经尝试与以下人员合作:

display: flex;    
align-items: center;    
justify-content: center;
这解决了我在头球上的问题,但在剩下的比赛中没有解决

@font-face{
字体系列:原始;
src:url('Roboto-Thin.ttf')格式('truetype');
}
img{
边框右上角半径:20px;
边框左上半径:20px;
宽度:70%;
}
.标语{
背景色:#333;
字体系列:“原始”;
字号:18px;
边缘顶部:2倍;
/*填充和边框*/
宽度:70%;
文本对齐:居中;
颜色:#F2F2;
边框右下半径:20px;
边框左下半径:20px;
}
.标语a{
显示:块;
颜色:#F2F2;
文本对齐:居中;
填充:20px 70px;
文字装饰:无;
背景:#333;
-o型过渡:颜色0.4s易出,背景0.4s易入;
-ms过渡:颜色0.4s缓变,背景0.4s缓变;
-moz过渡:颜色0.4s缓变,背景0.4s缓变;
-webkit过渡:颜色0.4s,背景0.4s;
放松;
/*…现在用正确的CSS属性覆盖*/
过渡:颜色0.4s放松,背景0.4s放松;
}
.标语a:悬停{
背景:ddd;
颜色:黑色;
高度:自动;
}
/*导航栏*/
navbar先生{
溢出:隐藏;
背景色:#333;
位置:固定;
/*将导航栏设置为固定位置*/
排名:0;
/*将导航栏定位在页面顶部*/
宽度:80%;
/*全宽*/
边框右下半径:20px;
边框左下半径:20px;
字体系列:“原始”;
字体大小:12px;
页边距底部:0;
}
身体{
显示器:flex;
对齐项目:居中;
证明内容:中心;
}
/*在鼠标悬停时更改背景*/
.导航栏a:悬停{
背景:ddd;
颜色:黑色;
}
/*导航栏内的链接*/
c.a{
浮动:左;
显示:块;
颜色:#F2F2;
文本对齐:居中;
填充:14px 60px;
文字装饰:无;
右边距:0px;
背景:#333;
-o型过渡:颜色0.4s易出,背景0.4s易入;
-ms过渡:颜色0.4s缓变,背景0.4s缓变;
-moz过渡:颜色0.4s缓变,背景0.4s缓变;
-webkit过渡:颜色0.4s,背景0.4s;
放松;
过渡:颜色0.4s放松,背景0.4s放松;
}
博士{
浮动:对;
显示:块;
颜色:#F2F2;
文本对齐:居中;
填充:14px 16px;
文字装饰:无;
左边距:0px;
背景:#333;
-o型过渡:颜色0.4s易出,背景0.4s易入;
-ms过渡:颜色0.4s缓变,背景0.4s缓变;
-moz过渡:颜色0.4s缓变,背景0.4s缓变;
-webkit过渡:颜色0.4s,背景0.4s;
放松;
过渡:颜色0.4s放松,背景0.4s放松;
}
/*主要内容*/
梅因先生{
边缘顶部:60像素;
/*添加上边距以避免内容重叠*/
}

var-myIndex=0;
转盘();
函数旋转木马(){
var i;
var x=document.getElementsByClassName(“mySlides”);
对于(i=0;ix.length){
myIndex=1
}
x[myIndex-1].style.display=“block”;
设置超时(转盘,6000);
}
一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

一些文字一些文字一些文字一些文字

 .main {
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   margin-top: 60px;
   /* Add a top margin to avoid content overlay */
 }